Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lucas Serrano
Share
Commits
855d9f40
Commit
855d9f40
authored
Jan 04, 2016
by
Lucas Serrano
Browse files
[expenses/models] Some comments
parent
63b2b127
Changes
1
Hide whitespace changes
Inline
Side-by-side
expenses/models.py
View file @
855d9f40
...
...
@@ -54,11 +54,14 @@ class Bill(models.Model):
}
def
clean
(
self
,
*
args
,
**
kwargs
):
"""
Integrity check and hack for empty form (self.atoms.all() == [])
"""
try
:
self
.
check_integrity
()
except
ValidationError
:
if
self
.
atoms
.
all
():
raise
raise
# Raise the last exception
def
check_integrity
(
self
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment