fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
af2f893
)
fix for no organization owner
author
Jan Szejko
<janek37@gmail.com>
Mon, 26 Mar 2018 15:18:12 +0000
(17:18 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Mon, 26 Mar 2018 15:18:12 +0000
(17:18 +0200)
apps/catalogue/views.py
patch
|
blob
|
history
diff --git
a/apps/catalogue/views.py
b/apps/catalogue/views.py
index
77548f8
..
4204e77
100644
(file)
--- a/
apps/catalogue/views.py
+++ b/
apps/catalogue/views.py
@@
-242,7
+242,7
@@
def book_pdf(request, pk, rev_pk):
ctx = Context(
files_path='http://%s/media/dynamic/uploads/%s/' % (request.get_host(), pk),
source_url='http://%s%s' % (request.get_host(), reverse('catalogue_html', args=[doc.pk])),
ctx = Context(
files_path='http://%s/media/dynamic/uploads/%s/' % (request.get_host(), pk),
source_url='http://%s%s' % (request.get_host(), reverse('catalogue_html', args=[doc.pk])),
- organization=doc.owner_organization.name,
+ organization=doc.owner_organization.name
if doc.owner_organization else doc.owner_user.get_full_name()
,
)
if doc.owner_organization is not None and doc.owner_organization.logo:
ctx.cover_logo = 'http://%s%s' % (request.get_host(), doc.owner_organization.logo.url)
)
if doc.owner_organization is not None and doc.owner_organization.logo:
ctx.cover_logo = 'http://%s%s' % (request.get_host(), doc.owner_organization.logo.url)