Skip to content
Snippets Groups Projects
Unverified Commit bb0b73d2 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

DOCS: Added in-code documentation.

parent 76c82ba8
Branches
No related tags found
1 merge request!191F remove deprecation warning
Pipeline #64793 canceled
...@@ -3130,19 +3130,19 @@ def _basic_sync(e_local, e_remote): ...@@ -3130,19 +3130,19 @@ def _basic_sync(e_local, e_remote):
def _deletion_sync(e_local, e_remote): def _deletion_sync(e_local, e_remote):
"""Synchronization if ``e_remote`` has been deleted.
Also sets is_valid and is_deleted on ``e_local``.
"""
if e_local is None or e_remote is None: if e_local is None or e_remote is None:
return return
try: # For message codes, see org.caosdb.server.entity.Message.java:
msg = e_remote.get_messages().get("Info", 10, exact=True) # try and get the deletion info # ENTITY_HAS_BEEN_DELETED_SUCCESSFULLY = "10"
if msg is None: msg = e_remote.get_messages().get("Info", 10, exact=True) # Try and get the deletion info.
if msg is None: # Deletion info wasn't there, do not sync.
e_local.messages = e_remote.messages e_local.messages = e_remote.messages
return return
except KeyError:
# deletion info wasn't there
e_local.messages = e_remote.messages
return
_basic_sync(e_local, e_remote) _basic_sync(e_local, e_remote)
e_local.is_valid = lambda: False e_local.is_valid = lambda: False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment