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()
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()
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()
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()