def get(self, history_id): result = None try: result = super(CIFlowSectionHistoryManager, self).get_queryset().get(id=history_id) except Exception as ex: SimpleLogger.exception(ex) return result
def get_version_archives(self, version_id): result = None try: result = super(ArchiveManager, self).get_queryset().filter(VersionID=version_id) except Exception as ex: SimpleLogger.exception(ex) return result
def get_project_documents(self, projectid): result = None try: result = super(ProjectDocumentManager, self).get_queryset().filter(ProjectID=projectid) except Exception as ex: SimpleLogger.exception(ex) return result
def get(self, tp_id): result = None try: result = super(TestApplicationManager, self).get_queryset().get(id=tp_id) except Exception as ex: SimpleLogger.exception(ex) return result
def get(self, code_url_id): result = None try: result = super(CodeUrlManager, self).get_queryset().get(id=code_url_id) except Exception as ex: SimpleLogger.exception(ex) return result
def edit_tag(tag_name, tag_id): try: dm_tag = Tag.objects.get(tag_id) dm_tag.TagName = tag_name dm_tag.save() except Exception as ex: print(ex) SimpleLogger.error(ex)
def get(self, id): result = None try: result = super(TaskDependencyManager, self).get_queryset().get(id=id) except Exception as ex: SimpleLogger.exception(ex) return result
def update_member_role(request, projectid, userid): result = True try: MemberService.update_role(request, projectid, userid) except Exception as ex: result = ProjectRes.project_member_update_role_fail SimpleLogger.error(ex) return HttpResponse(result)
def get_member_add_dialog(request, projectid): result = False try: page_worker = ProjectSettingsPageWorker(request) result = page_worker.get_project_member_add_dialog(request, projectid) except Exception as ex: SimpleLogger.error(ex) return HttpResponse(result)
def get(self, section_id): result = None try: result = super(CITaskFlowSectionManager, self).get_queryset().get(id=section_id) except Exception as ex: SimpleLogger.exception(ex) return result
def remove(request, projectid): result = True try: MemberService.remove_member(request, projectid) except Exception as ex: result = ProjectRes.project_member_remove_fail SimpleLogger.error(ex) return HttpResponse(result)
def get(self, service_id): result = None try: result = super(CIDeployServiceManager, self).get_queryset().get(id=service_id) except Exception as ex: SimpleLogger.exception(ex) return result
def get_by_historyid(self, history_id): result = None try: result = self.all().filter(TaskHistoryID=history_id).filter( ParentResultID=0)[0] except Exception as ex: SimpleLogger.exception(ex) return result
def get_history_by_sechistory(self, sec_history_id, is_active=1): result = list() try: result = self.all(is_active).filter( FlowSectionHistory=sec_history_id) except Exception as ex: SimpleLogger.exception(ex) return result
def search_task(request): result = "" try: page_worker = CITaskPageWorker(request) result = page_worker.search_tasks(request) except Exception as ex: SimpleLogger.exception(ex) return HttpResponse(result)
def update(request,projectid,webhookid): result="" try: WebHookService.edit_webhook(request,projectid,webhookid) except Exception as ex: result=Project.project_webhook_save_fail SimpleLogger.error(ex) return HttpResponse(result)
def is_selected(self): result="" try: if self.dm_data_value.DicDataValue==int(self.selected_value): result="selected" except Exception as ex: SimpleLogger.exception(ex) return result
def remove(request,projectid,webhookid): result=True try: WebHookService.remove_webhook(request,webhookid) except Exception as ex: result=Project.project_webhook_remove_fail SimpleLogger.error(ex) return HttpResponse(result)
def get_tags(self, owner, owner_type): result = list() try: result = self.all().filter(Owner=owner).filter( OwnerType=owner_type) except Exception as ex: SimpleLogger.exception(ex) return result
def get_bslogs_by_deviceid(device_id): result=list() try: result=BusinessLog.objects.all().filter(deviceId=device_id) except Exception as ex: SimpleLogger.exception(ex) return result
def get(self, versionid): result = None try: result = super(VersionManager, self).get_queryset().get(id=versionid) except Exception as ex: SimpleLogger.exception(ex) return result
def member_avatar(self): result = "/static/global/images/fruit-avatar/Fruit-1.png" try: if self.member.extend_info: result = AccountService.get_avatar_url(self.member) except Exception as ex: SimpleLogger.exception(ex) return result
def get(self, webhook_id): result = None try: result = super(WebHookManager, self).get_queryset().get(id=webhook_id) except Exception as ex: SimpleLogger.exception(ex) return result
def create(request): taskid = 0 try: ci_task = CITaskService.create_ci_task(request) taskid = ci_task.id except Exception as ex: SimpleLogger.exception(ex) return HttpResponse(taskid)
def get(self, projectid): result = None try: result = super(ProjectManager, self).get_queryset().get(id=projectid) except Exception as ex: SimpleLogger.exception(ex) return result
def delete_task(request, task_id): result = "True" try: CITaskService.delete_ci_task(request, task_id) except Exception as ex: result = str(ex) SimpleLogger.exception(ex) return HttpResponse(result)
def get(self, archive_id): result = None try: result = super(ArchiveManager, self).get_queryset().filter(id=archive_id) except Exception as ex: SimpleLogger.exception(ex) return result
def clean_task_history(request, task_id): result = "True" try: CITaskService.clean_task_history(request, task_id) except Exception as ex: result = str(ex) SimpleLogger.exception(ex) return HttpResponse(result)
def get_child_documents(self, document_id): result = list() try: result = super(ProjectDocumentManager, self).get_queryset().filter(Parent=document_id) except Exception as ex: SimpleLogger.exception(ex) return result
def project_tester_required(parser, token): parameters=token.split_contents() try: nodelist = parser.parse(('end_project_tester',)) parser.delete_first_token() except Exception as ex: SimpleLogger.exception(ex) return project_role_required_node.TesterRequiredNode(nodelist,parameters[1])