mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 00:55:50 +00:00
fix(epg): prevent updating password field with empty value in EPGSourceSerializer
This commit is contained in:
parent
7d2f0cdab3
commit
d000e777f1
1 changed files with 2 additions and 0 deletions
|
|
@ -68,6 +68,8 @@ class EPGSourceSerializer(serializers.ModelSerializer):
|
|||
cron_expr = f'{ct.minute} {ct.hour} {ct.day_of_month} {ct.month_of_year} {ct.day_of_week}'
|
||||
instance._cron_expression = cron_expr
|
||||
for attr, value in validated_data.items():
|
||||
if attr == 'password' and not value:
|
||||
continue
|
||||
setattr(instance, attr, value)
|
||||
instance.save()
|
||||
return instance
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue