-
Notifications
You must be signed in to change notification settings - Fork 9
Description
App devs have encountered an issue where they supply the same name to the report object and the data object, leading the data object to be overwritten (but saved as version 1) of the object. Since report objects are hidden, the data object is hidden as well. This can be very confusing for the user as the data object appears momentarily in the narrative data panel and then disappears.
Two quick fixes:
- Document in the create_*report methods that the name supplied to the report should not collide with data objects.
- Before saving the report, check whether an object of the same name already exists and is not a report object, and fail if that is the case. This is subject to race conditions, and therefore not 100% reliable, so Fix 1) should still be implemented.
(Very) Longterm fix:
Add the ability for the workspace to abort a save if the object already exists and isn't one of a set of input types. This would reduce the possibility of the race condition, or potentially eliminate it.
Workaround:
Use a guaranteed unique name for the report object. If a name is not supplied, a unique name is generated by default.