Skip to content
Snippets Groups Projects
Commit 58fd499e authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

FIX: Actually remove name overrides

parent ab894c19
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,8 @@ from .box_loan import (BOX, BOX_BORROWED, DESTINATION, F_LOAN, LENT, S_LENT, S_L ...@@ -33,7 +33,8 @@ from .box_loan import (BOX, BOX_BORROWED, DESTINATION, F_LOAN, LENT, S_LENT, S_L
def _set_lent_box(loan): def _set_lent_box(loan):
""" Store the exact versions of borrowed items when it was delivered to the borrower. """ """ Store the exact versions of borrowed items when it was delivered to the borrower. """
references = set_references_to_current_version(loan.get_property(BOX).value) references = set_references_to_current_version(loan.get_property(BOX).value)
loan.add_property(id=BOX.id, name=BOX_BORROWED.name, value=references, borrowed_prop = db.get_entity_by_name(BOX_BORROWED.name, role="PROPERTY")
loan.add_property(id=borrowed_prop.id, value=references,
datatype=db.LIST(BOX.name) if isinstance(references, list) else BOX.name) datatype=db.LIST(BOX.name) if isinstance(references, list) else BOX.name)
loan.update() loan.update()
......
...@@ -37,7 +37,8 @@ def _set_returned_box(loan): ...@@ -37,7 +37,8 @@ def _set_returned_box(loan):
This stores the version of the box that was returned by a borrower. This stores the version of the box that was returned by a borrower.
""" """
references = set_references_to_current_version(loan.get_property(BOX_BORROWED.name).value) references = set_references_to_current_version(loan.get_property(BOX_BORROWED.name).value)
loan.add_property(id=BOX.id, name=BOX_RETURNED.name, value=references, returned_prop = db.get_entity_by_name(BOX_RETURNED.name, role="PROPERTY")
loan.add_property(id=returned_prop.id, value=references,
datatype=db.LIST(BOX.name) if isinstance(references, list) else BOX.name) datatype=db.LIST(BOX.name) if isinstance(references, list) else BOX.name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment