Using a shallow copy instead of ineficient json conversion
This commit is contained in:
parent
2813a095de
commit
9fa8cd57ba
|
@ -311,7 +311,7 @@ class Device:
|
|||
if is_user_authenticated:
|
||||
return self.components
|
||||
|
||||
public_components = json.loads(json.dumps(self.components))
|
||||
public_components = [component.copy() for component in self.components]
|
||||
self.remove_sensitive_data_from(public_components)
|
||||
return public_components
|
||||
|
||||
|
|
Loading…
Reference in a new issue