fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Cleanup
[wolnelektury.git]
/
src
/
redirects
/
admin.py
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}'