issue:
When a user object is empty cannot be printed due as the repr method uses the save() method to print the properties of the users, which raise Exception in case no appliances are added to the user.
solution:
in case save() methods returns an exception, the function prints the user_name, and user_num with a message to mention no appliances are assigned to the user object yet.
additional:
found a bug in __eq__ method of Appliance class and fixed it
add the possibility for a user to pass directly Appliance instances to the add_appliance method of the User class
issue: When a user object is empty cannot be printed due as the repr method uses the save() method to print the properties of the users, which raise Exception in case no appliances are added to the user.
solution: in case save() methods returns an exception, the function prints the user_name, and user_num with a message to mention no appliances are assigned to the user object yet.
additional:
__eq__
method ofAppliance
class and fixed itAppliance
instances to theadd_appliance
method of theUser
class