Skip to content

Commit 44d3c4d

Browse files
committed
🔊 Adding more debug info on broken signature
1 parent 6208da3 commit 44d3c4d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

app/routers/petitions.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,17 @@ async def sign(petition_id: str, signature: PetitionSignature, expand: bool = Fa
201201
petition = zencode(
202202
CONTRACTS.ADD_SIGNATURE, keys=p.petition, data=signature.json()
203203
)
204+
p.petition = petition
205+
DBSession.commit()
204206
except Error as e:
207+
debug(f"Failed to sign {p.petition_id}")
208+
debug(p.petition)
205209
debug(e)
206210
raise HTTPException(
207211
status_code=HTTP_424_FAILED_DEPENDENCY,
208212
detail="Petition signature is duplicate or not valid",
209213
)
210-
p.petition = petition
211214

212-
DBSession.commit()
213215
return p.publish(expand)
214216

215217

0 commit comments

Comments
 (0)