Skip to content

Commit

Permalink
fix: SpamBone regression of descr-property (#1246)
Browse files Browse the repository at this point in the history
This is a regression introduced by #1227 causing descr() is called
before a session is available.
  • Loading branch information
phorward authored Aug 27, 2024
1 parent 4267b22 commit 166e6dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/viur/core/bones/spam.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ def descr(self):
"""
The descr-property is generated and uses session variables to construct the question.
"""
session = current.session.get()

# The session is not available during startup
if not (session := current.session.get()):
return None

a = session.get("spambone.value.a")
b = session.get("spambone.value.b")
Expand Down

0 comments on commit 166e6dc

Please sign in to comment.