move logic to model and remove potential harmful code (avoid using del) #32

Open
sergiogimenez wants to merge 2 commits from fix/109-small-refactors-public-website into main
Showing only changes of commit 9fa8cd57ba - Show all commits

View file

@ -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