fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stats
[redakcja.git]
/
src
/
alerts
/
models.py
diff --git
a/src/alerts/models.py
b/src/alerts/models.py
index
132531f
..
a262980
100644
(file)
--- a/
src/alerts/models.py
+++ b/
src/alerts/models.py
@@
-39,4
+39,5
@@
class Alert(models.Model):
@receiver(post_commit)
def validate_post_commit(sender, **kwargs):
@receiver(post_commit)
def validate_post_commit(sender, **kwargs):
- Alert.validate_book(sender.tree.book)
+ if hasattr(sender.tree, 'book'):
+ Alert.validate_book(sender.tree.book)