Skip to content

Commit aedaea4

Browse files
committed
Show unique_processors from app serialzier
1 parent f85ca01 commit aedaea4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

apps/serializers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,11 @@ def get_processors(self, obj):
179179

180180
def get_unique_processors(self, obj):
181181
if obj.has_write_permission(self._request_user):
182-
return []
183182
data = self.get_data(obj)
184-
processors = self.get_processors(obj)
183+
processors = data.get('processors', []) if data else []
185184
unique_processors = []
186185
for processor in processors:
187-
name = f"{processor['api_backend']['api_provider']['name']} / {processor['api_backend']['name']}"
186+
name = f"{processor['provider_slug']} / {processor['processor_slug']}"
188187
if name not in unique_processors:
189188
unique_processors.append(name)
190189
return unique_processors

0 commit comments

Comments
 (0)