Skip to content

Commit

Permalink
Update relation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuess committed May 18, 2023
1 parent 89f68ac commit 13da2f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/plone/api/relation.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,11 @@ def create(source=None, target=None, relationship=None):
"from_id": from_id,
"to_id": to_id,
}
has_relation = False if (
len([el for el in relation_catalog.findRelations(query)]) == 0) else True
has_relation = (
False
if (len([el for el in relation_catalog.findRelations(query)]) == 0)
else True
)

if from_attribute == referencedRelationship:
# Don't mess with linkintegrity-relations!
Expand Down

0 comments on commit 13da2f3

Please sign in to comment.