Skip to content

Commit

Permalink
Update pykechain/models/property_reference.py
Browse files Browse the repository at this point in the history
Co-authored-by: KNiski <KaczuH@users.noreply.github.com>
  • Loading branch information
jberends and KaczuH authored Jan 23, 2025
1 parent d901e50 commit d913f00
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pykechain/models/property_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,13 @@ def upload(self, data: Any) -> None:
filepath=data,
)
if self.has_validator(SingleReferenceValidator):
# we want to replace value
self.value = [new_stored_file]
else:
self.value = (
self.value + [new_stored_file] if self.value else [new_stored_file]
)
if self.value:
self.value.append(new_stored_file)
else:
self.value = [new_stored_file]


class SignatureProperty(_ReferenceProperty):
Expand Down

0 comments on commit d913f00

Please sign in to comment.