1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 09:58:23 +02:00

Add "Lock note" feature

This commit is contained in:
Yohann D'ANELLO
2020-08-31 20:15:48 +02:00
parent 0c753c3288
commit 5e65e2d74a
11 changed files with 279 additions and 81 deletions

View File

@ -221,10 +221,8 @@ class Transaction(PolymorphicModel):
diff_source, diff_dest = self.validate()
if not self.source.is_active or not self.destination.is_active:
if 'force_insert' not in kwargs or not kwargs['force_insert']:
if 'force_update' not in kwargs or not kwargs['force_update']:
raise ValidationError(_("The transaction can't be saved since the source note "
"or the destination note is not active."))
raise ValidationError(_("The transaction can't be saved since the source note "
"or the destination note is not active."))
# If the aliases are not entered, we assume that the used alias is the name of the note
if not self.source_alias: