fix: serialize media publishing decisions
This commit is contained in:
@@ -12,6 +12,11 @@ KNOWN_MEDIA_ROLES = WATERBODY_MEDIA_ROLES | TACKLE_MEDIA_ROLES
|
||||
MEDIA_ROLES_BY_ENTITY = {"waterbody": WATERBODY_MEDIA_ROLES, "tackle": TACKLE_MEDIA_ROLES}
|
||||
|
||||
|
||||
def media_manifest_version() -> int:
|
||||
manifest = json.loads((MEDIA_ROOT / "manifest.json").read_text(encoding="utf-8"))
|
||||
return max(1, int(manifest.get("version", 1)))
|
||||
|
||||
|
||||
def _public_role_allowed(entity_type: str | None, role: object) -> bool:
|
||||
if role is None:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user