Base.py 516 B

1234567891011121314151617181920212223
  1. class Base:
  2. # Contains object id
  3. id = 0
  4. # Contains object id created to database
  5. idDataBase = 0
  6. # Contains all de object children
  7. child = []
  8. # Contains name
  9. name = ""
  10. # Contains errors
  11. error = None
  12. def __init__(self):
  13. pass
  14. def add_error(self, err):
  15. """
  16. Add errors to property error
  17. :param err: Constains a string with error description
  18. """
  19. if not self.error:
  20. self.error = []
  21. self.error.append(err)