fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
47f52a3
)
fix
author
Radek Czajka
<rczajka@rczajka.pl>
Thu, 30 Apr 2020 08:27:49 +0000
(10:27 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Thu, 10 Sep 2020 12:15:11 +0000
(14:15 +0200)
src/redirects/admin.py
patch
|
blob
|
history
diff --git
a/src/redirects/admin.py
b/src/redirects/admin.py
index
6742404
..
0889b58
100644
(file)
--- a/
src/redirects/admin.py
+++ b/
src/redirects/admin.py
@@
-9,6
+9,8
@@
class RedirectAdmin(admin.ModelAdmin):
fields = ['slug', 'url', 'counter', 'created_at', 'full_url']
def full_url(self, obj):
+ if not obj.slug:
+ return None
site = Site.objects.get_current()
url = obj.get_absolute_url()
return f'https://{site.domain}{url}'