Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion djangosaml2idp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def metadata_path(self) -> str:
# Rewrite the file if it did not exist yet, or if the SP config was updated after having written the file previously.
if not os.path.exists(filename) or refreshed_metadata or (self.dt_updated and self.dt_updated.replace(tzinfo=pytz.utc) > datetime.datetime.fromtimestamp(os.path.getmtime(filename)).replace(tzinfo=pytz.utc)):
try:
with open(filename, 'w') as f:
with open(filename, 'w', encoding='utf-8') as f:
f.write(self.local_metadata)
except Exception as e:
logger.error(f'Could not write metadata to file {filename}: {e}')
Expand Down