Skip to content

Commit

Permalink
do not validate transaction if deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
sdementen committed Dec 3, 2015
1 parent 250e917 commit ec147e7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions piecash/core/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ def object_to_validate(self, change):
def validate(self):
old = self.get_all_changes()

if old["STATE_CHANGES"][-1]=="deleted":
return

if self.currency.namespace != "CURRENCY":
raise GncValidationError("You are assigning a non currency commodity to a transaction")

Expand Down

0 comments on commit ec147e7

Please sign in to comment.