funkwhale/api/funkwhale_api/radios/registries.py

11 wiersze
212 B
Python

import persisting_theory
class RadioRegistry(persisting_theory.Registry):
def prepare_name(self, data, name=None):
setattr(data, "radio_type", name)
return name
registry = RadioRegistry()