Example #1
0
 def create_teams_page_setting(self, args) -> (dict, MassEnergizeAPIError):
   try:
     new_teams_page_setting = TeamsPageSettings.create(**args)
     new_teams_page_setting.save()
     return new_teams_page_setting, None
   except Exception:
     return None, ServerError()
Example #2
0
 def create_team(self, args) -> (dict, MassEnergizeAPIError):
   try:
     new_team = Team.create(**args)
     new_team.save()
     return new_team, None
   except Exception:
     return None, ServerError()
Example #3
0
 def create_tag(self, args) -> Tuple[dict, MassEnergizeAPIError]:
   try:
     new_tag = Tag.objects.objects.create(**args)
     new_tag.save()
     return new_tag, None
   except Exception:
     return None, ServerError()
Example #4
0
 def create_page_setting(self, args) -> Tuple[dict, MassEnergizeAPIError]:
     try:
         new_page_setting = self.pageSettingsModel.create(**args)
         new_page_setting.save()
         return new_page_setting, None
     except Exception:
         return None, ServerError()