[logdata] Janky fix to people and platform ids

This commit is contained in:
2025-08-19 00:46:08 -04:00
parent 1cf50209a4
commit b11d87af75
3 changed files with 14 additions and 27 deletions

View File

@ -969,11 +969,14 @@ class ScrobbleDetailView(DetailView):
original_value = (self.object.log or {}).get(field_name)
data[field_name] = original_value
if "with_people_ids" in data:
if data.get("with_people_ids", False):
data["with_people_ids"] = [
p.id for p in data["with_people_ids"]
]
if data.get("platform_id", False):
data["platform_id"] = data["platform_id"].id
self.object.log = data
self.object.save(update_fields=["log"])
return redirect(self.object.get_absolute_url())