Calls to get_page_property should return None for non-entries on a page. This was the original intent with the implementation, but final tweaks for initial APIv2 support made the default result a partially populated property instance. This commit cleans up this to restore the original intent to have undefined properties return None, as well as updates various locations to use a default property value for each applicable section. Specifically:
CB_PROP_KEY returns a prepared empty value dictionary, since the requests will push up a new property change
Property fetching for v2 will return a None populated value to explicitly indicate that the requests should support this type of metadata, as well as that Confluence has reported no value exists
Update events will populate with a fallback value None, which will be updated with the provided property value for the expected change to the property value.
publisher: skip property version bumps for non-populated entries
This extension tracks certain property entries as an indication that a property is supported for this instance (e.g. on Confluence Cloud, a content width property exists, but not on Confluence Server (at this time?)). However, even if we track support, it does not mean that Confluence has reported the property has been defined for a page.
When we publish property updates for a page, we perform a version bump to indicate to Confluence the property is being updated. Although, for non-defined property entries, the value is set to None with no version entries. This causes the implementation to fail since there is no version value to bump. This commit corrects this by checking that the previous value does exist before attempting any version bump; otherwise, it treats the property update event as if it was created a new property entry.
publisher: rework page property processing
Calls to
get_page_property
should returnNone
for non-entries on a page. This was the original intent with the implementation, but final tweaks for initial APIv2 support made the default result a partially populated property instance. This commit cleans up this to restore the original intent to have undefined properties returnNone
, as well as updates various locations to use a default property value for each applicable section. Specifically:CB_PROP_KEY
returns a prepared empty value dictionary, since the requests will push up a new property changeNone
populated value to explicitly indicate that the requests should support this type of metadata, as well as that Confluence has reported no value existsNone
, which will be updated with the provided property value for the expected change to the property value.publisher: skip property version bumps for non-populated entries
This extension tracks certain property entries as an indication that a property is supported for this instance (e.g. on Confluence Cloud, a content width property exists, but not on Confluence Server (at this time?)). However, even if we track support, it does not mean that Confluence has reported the property has been defined for a page.
When we publish property updates for a page, we perform a version bump to indicate to Confluence the property is being updated. Although, for non-defined property entries, the value is set to
None
with no version entries. This causes the implementation to fail since there is no version value to bump. This commit corrects this by checking that the previous value does exist before attempting any version bump; otherwise, it treats the property update event as if it was created a new property entry.