chore: fix bug in unlink_asset_reference
This commit is contained in:
parent
2cd42dbb10
commit
18fc2b5695
@ -293,6 +293,10 @@ class JournalEntry(AccountsController):
|
||||
depr_schedule = get_depr_schedule_from_asset_depr_schedule_of_asset(
|
||||
asset.name, row.finance_book
|
||||
)
|
||||
|
||||
if not depr_schedule:
|
||||
return
|
||||
|
||||
for s in depr_schedule:
|
||||
if s.journal_entry == self.name:
|
||||
s.db_set("journal_entry", None)
|
||||
|
Loading…
Reference in New Issue
Block a user