fix(api): update model fields in set_icecast_passwords (#1903)
This commit is contained in:
parent
dc426f0aa5
commit
cbfd9e51fd
|
@ -60,18 +60,18 @@ class Command(BaseCommand):
|
||||||
|
|
||||||
if source_password is not None:
|
if source_password is not None:
|
||||||
Preference.objects.update_or_create(
|
Preference.objects.update_or_create(
|
||||||
keystr="default_icecast_password",
|
key="default_icecast_password",
|
||||||
defaults={"valstr": source_password},
|
defaults={"value": source_password},
|
||||||
)
|
)
|
||||||
|
|
||||||
for key in ["s1", "s2", "s3", "s4"]:
|
for key in ["s1", "s2", "s3", "s4"]:
|
||||||
if admin_password is not None:
|
if admin_password is not None:
|
||||||
StreamSetting.objects.update_or_create(
|
StreamSetting.objects.update_or_create(
|
||||||
keyname=f"{key}_admin_pass",
|
key=f"{key}_admin_pass",
|
||||||
defaults={"value": admin_password},
|
defaults={"value": admin_password},
|
||||||
)
|
)
|
||||||
if source_password is not None:
|
if source_password is not None:
|
||||||
StreamSetting.objects.update_or_create(
|
StreamSetting.objects.update_or_create(
|
||||||
keyname=f"{key}_pass",
|
key=f"{key}_pass",
|
||||||
defaults={"value": source_password},
|
defaults={"value": source_password},
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue