fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee77d43
)
smarter mark final form
author
Jan Szejko
<janek37@gmail.com>
Mon, 3 Sep 2018 12:33:40 +0000
(14:33 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Mon, 3 Sep 2018 12:33:40 +0000
(14:33 +0200)
apps/catalogue/forms.py
patch
|
blob
|
history
diff --git
a/apps/catalogue/forms.py
b/apps/catalogue/forms.py
index
a256dfa
..
ea6a4ae
100644
(file)
--- a/
apps/catalogue/forms.py
+++ b/
apps/catalogue/forms.py
@@
-203,7
+203,7
@@
class MarkFinalForm(forms.Form):
def clean_books(self):
books_value = self.cleaned_data['books']
- slugs = [line.s
plit('/')[-2
] for line in books_value.split('\n') if line.strip()]
+ slugs = [line.s
trip().strip('/').split('/')[-1
] for line in books_value.split('\n') if line.strip()]
books = Book.objects.filter(slug__in=slugs)
if len(books) != len(slugs):
raise forms.ValidationError(