Galerie: None se porovnává přes is, ne rovnítkem.
This commit is contained in:
parent
223c4054f6
commit
843c00dd60
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ def zobrazit(galerie, request):
|
|||
def cesta_od_korene(g):
|
||||
"""Vrátí seznam galerií od kořene ke g"""
|
||||
cesta = []
|
||||
while g != None:
|
||||
while g is not None:
|
||||
cesta.append(g)
|
||||
g = g.galerie_up
|
||||
return reversed(cesta)
|
||||
|
@ -53,7 +53,7 @@ def nahled(request, pk, soustredeni):
|
|||
for g in sourozenci:
|
||||
if g.pk == galerie.pk:
|
||||
predchozi = minuly
|
||||
if minuly != None and minuly.pk == galerie.pk:
|
||||
if minuly is not None and minuly.pk == galerie.pk:
|
||||
nasledujici = g
|
||||
break
|
||||
minuly = g
|
||||
|
|
Loading…
Reference in a new issue