Skip to content

Commit

Permalink
quick return if nothing to insert
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbull committed Jan 21, 2025
1 parent bffac4d commit 0360df3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/aiida/storage/psql_dos/orm/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ def check_node(given_node):
for node in nodes:
check_node(node)
ins_dict.append({'dbnode_id': node.id, 'dbgroup_id': self.id})
if len(ins_dict) == 0:
return

table = self.GROUP_NODE_CLASS.__table__
ins = insert(table).values(ins_dict)
Expand Down

0 comments on commit 0360df3

Please sign in to comment.