From cf3c9f6f805dc839f6550bbae74b5abba67bb82c Mon Sep 17 00:00:00 2001 From: ticvac Date: Sat, 15 Jun 2024 23:27:42 +0200 Subject: [PATCH] prazdy string -> continue --- personalni/admin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/personalni/admin.py b/personalni/admin.py index e86898db..3418769a 100644 --- a/personalni/admin.py +++ b/personalni/admin.py @@ -8,6 +8,8 @@ from datetime import datetime @admin.action(description="Sjednoť telefony") def sjednot_telefony(admin, request, queryset): for o in queryset: + if o.telefon == '': + continue try: telefon = int(o.telefon.replace(" ", "").replace("+", "")) # 6 míst