Skip to content

Instantly share code, notes, and snippets.

@ofelix03
Last active May 6, 2021 22:14
Show Gist options
  • Select an option

  • Save ofelix03/e33da71d7b4f7185766eb2bfba6ed1c6 to your computer and use it in GitHub Desktop.

Select an option

Save ofelix03/e33da71d7b4f7185766eb2bfba6ed1c6 to your computer and use it in GitHub Desktop.
refactor-merging-conditional-guards
if "amount" not in vals and vals['amount'] > 0:
raise ValidationError(_("Cheque amount must be provided and must be greater than zero"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment