mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 23:09:17 +02:00
See #170: admin UI for channels, reporting channels
This commit is contained in:
parent
ae52969efe
commit
102c90d499
32 changed files with 1106 additions and 77 deletions
|
@ -266,5 +266,11 @@ def get_object_by_fid(fid, local=None):
|
|||
|
||||
if not result:
|
||||
raise ObjectDoesNotExist()
|
||||
model = apps.get_model(*result["__type"].split("."))
|
||||
instance = model.objects.get(fid=fid)
|
||||
if model._meta.label == "federation.Actor":
|
||||
channel = instance.get_channel()
|
||||
if channel:
|
||||
return channel
|
||||
|
||||
return apps.get_model(*result["__type"].split(".")).objects.get(fid=fid)
|
||||
return instance
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue