Configures ruff as the one stop linter and resolves warnings it raised

This commit is contained in:
Trenton H
2023-03-28 09:39:30 -07:00
parent 5869467db3
commit ce41ac9158
110 changed files with 507 additions and 491 deletions

View File

@@ -38,9 +38,11 @@ class MailAccountSerializer(OwnedObjectSerializer):
]
def update(self, instance, validated_data):
if "password" in validated_data:
if len(validated_data.get("password").replace("*", "")) == 0:
validated_data.pop("password")
if (
"password" in validated_data
and len(validated_data.get("password").replace("*", "")) == 0
):
validated_data.pop("password")
super().update(instance, validated_data)
return instance