diff --git a/src/caosdb/common/models.py b/src/caosdb/common/models.py index 9c420c8cae75171e0b233f2fd23f87dc2fa61367..86a281b1fd9b972178f0faf59a028dd49bd5d8da 100644 --- a/src/caosdb/common/models.py +++ b/src/caosdb/common/models.py @@ -388,7 +388,7 @@ class Entity(object): self.properties.append( property=new_property, importance=( kwargs['importance'] if 'importance' in kwargs else None), inheritance=( - kwargs['inheritance'] if 'inheritance' in kwargs else None)) + kwargs['inheritance'] if 'inheritance' in kwargs else None)) return self @@ -478,11 +478,11 @@ class Entity(object): name_result = ( not check_name or (parent.name is not None and - parent.name in [pp.name for pp in parents])) + parent.name in [pp.name for pp in parents])) id_result = ( not check_id or (parent.id is not None and - parent.id in [pp.id for pp in parents])) + parent.id in [pp.id for pp in parents])) return name_result and id_result @@ -2489,8 +2489,8 @@ class Container(list): for remote_entity in remote_container: if remote_entity.path is not None and str( remote_entity.path) == ( - local_entity.path if local_entity.path.startswith("/") else "/" + - local_entity.path) and remote_entity not in used_remote_entities: + local_entity.path if local_entity.path.startswith("/") else "/" + + local_entity.path) and remote_entity not in used_remote_entities: sync_remote_entities.append(remote_entity) used_remote_entities.append(remote_entity) @@ -2514,16 +2514,13 @@ class Container(list): for remote_entity in remote_container: if remote_entity.name is not None \ - and ( - str(remote_entity.name) == str( - local_entity.name) or - ( - name_case_sensitive is False and - str(remote_entity.name).lower() == str( - local_entity.name).lower() - ) - ) \ - and remote_entity not in used_remote_entities: + and (str(remote_entity.name) == str(local_entity.name) or + (name_case_sensitive is False and + str(remote_entity.name).lower() == str( + local_entity.name).lower() + ) + ) \ + and remote_entity not in used_remote_entities: sync_remote_entities.append(remote_entity) used_remote_entities.append(remote_entity)