Project

Profile

Help

Refactor #1506

Updated by bmbouter over 8 years ago

Currently platform has we have a ContentUnit and a FileContentUnit. When FileContentUnit was created, the "file" related attributes and methods were moved from ContentUnit to FileContentUnit except for the _storage_path field, which is now present on both. The _storage_path needs to be removed from ContentUnit definition, it doesn't belong there. 

 It was left there because removing it will take work. The When the attribute is defined on ContentUnit but never used; used, when accessed, accessed it has the value None. Code in platform and many plugins rely on this behavior and things will break when it is removed since AttributeError will be raised. As another example, things like nodes don't make a distinction about content type so that may need a more significant fix than other areas. removed. 

 This refactor includes both removing the field and field, but also updating the code which uses that field through the platform and plugins. Note the usage only needs to be done when the unit type is not a descendant of FileContentUnit. Only in those situations does the field removal matter since FileContentUnit provides _storage_path.

Back