Address CodeQL

This commit is contained in:
Michael Shamoon 2022-12-08 09:31:00 -08:00
parent 2ec695fba7
commit b99422da12
2 changed files with 1 additions and 2 deletions

View File

@ -47,7 +47,7 @@ export class PermissionsSelectComponent
set inheritedPermissions(inherited: string[]) { set inheritedPermissions(inherited: string[]) {
// remove <app_label>. from permission strings // remove <app_label>. from permission strings
this._inheritedPermissions = inherited?.length this._inheritedPermissions = inherited?.length
? inherited.map((p) => p.replace(/.+\./, '')) ? inherited.map((p) => p.replace(/^\w+\./g, ''))
: [] : []
} }

View File

@ -49,7 +49,6 @@ class UserSerializer(serializers.ModelSerializer):
def update(self, instance, validated_data): def update(self, instance, validated_data):
if "password" in validated_data: if "password" in validated_data:
if len(validated_data.get("password").replace("*", "")) > 0: if len(validated_data.get("password").replace("*", "")) > 0:
print("set", validated_data.get("password"))
instance.set_password(validated_data.get("password")) instance.set_password(validated_data.get("password"))
instance.save() instance.save()
validated_data.pop("password") validated_data.pop("password")