You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[bug] position field broken with children elements
Currently, when we create children, it still uses the standard position of the document based on the length of the total database.
defcreate(self, data, parent_id=None):
data['created_at'] =datetime.datetime.now()
data['last_edited'] =datetime.datetime.now()
data['position'] =self.collection.count_documents({}) +1# Assign the next positionifparent_idisnotNone:
data['parent_id'] =parent_id# Add the parent_id to the documentreturnself.collection.insert_one(data).inserted_id
We need to change this such that, if parent is not null, we use different logic to determine position.
Originally posted by @signebedi in #9 (comment)
The text was updated successfully, but these errors were encountered: