fix(api): update model fields in set_icecast_passwords (#1903)

This commit is contained in:
Jonas L 2022-06-22 08:35:26 +02:00 committed by GitHub
parent dc426f0aa5
commit cbfd9e51fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -60,18 +60,18 @@ class Command(BaseCommand):
if source_password is not None:
Preference.objects.update_or_create(
keystr="default_icecast_password",
defaults={"valstr": source_password},
key="default_icecast_password",
defaults={"value": source_password},
)
for key in ["s1", "s2", "s3", "s4"]:
if admin_password is not None:
StreamSetting.objects.update_or_create(
keyname=f"{key}_admin_pass",
key=f"{key}_admin_pass",
defaults={"value": admin_password},
)
if source_password is not None:
StreamSetting.objects.update_or_create(
keyname=f"{key}_pass",
key=f"{key}_pass",
defaults={"value": source_password},
)