Skip to content

Commit b5012b4

Browse files
Add troubleshooting info to IntegrityError logging
1 parent 8770109 commit b5012b4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

repokid/role.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -423,11 +423,13 @@ def store(self, fields: Optional[List[str]] = None) -> None:
423423
):
424424
# Fetch the rest of the role data for debugging
425425
remote_role_data.fetch()
426-
logger.debug(
427-
"role has been updated since last fetch",
426+
logger.warning(
427+
"role has been updated since last fetch: stored %s, local %s",
428+
remote_role_data.last_updated,
429+
self.last_updated,
428430
extra={
429431
"stored_role": remote_role_data.dict(),
430-
"current_role": self.dict(),
432+
"local_role": self.dict(),
431433
},
432434
)
433435
raise IntegrityError("stored role has been updated since last fetch")

0 commit comments

Comments
 (0)