notifications: rename "founded_uuids" to "existing_uuids" (#64497)
This commit is contained in:
parent
f10d789389
commit
cd71255ae5
|
@ -42,7 +42,7 @@ class NotificationSerializer(serializers.Serializer):
|
|||
def validate(self, attrs):
|
||||
super().validate(attrs)
|
||||
users = []
|
||||
founded = []
|
||||
existing = []
|
||||
missing = []
|
||||
for uuid in attrs.get('name_ids') or []:
|
||||
try:
|
||||
|
@ -51,9 +51,9 @@ class NotificationSerializer(serializers.Serializer):
|
|||
missing.append(uuid)
|
||||
else:
|
||||
users.append(user)
|
||||
founded.append(uuid)
|
||||
existing.append(uuid)
|
||||
attrs['users'] = users
|
||||
attrs['founded_uuids'] = founded
|
||||
attrs['existing_uuids'] = existing
|
||||
attrs['missing_uuids'] = missing
|
||||
return attrs
|
||||
|
||||
|
@ -94,7 +94,7 @@ class Add(GenericAPIView):
|
|||
else:
|
||||
data = {
|
||||
'nb_notify': len(notification_ids),
|
||||
'notified': payload.get('founded_uuids'),
|
||||
'notified': payload.get('existing_uuids'),
|
||||
'unnotified': payload.get('missing_uuids'),
|
||||
}
|
||||
if payload.get('id'):
|
||||
|
|
Loading…
Reference in New Issue