Skip to content

Commit

Permalink
Merge pull request #730 from mapyJJJ/bugfix_update_remark_branch
Browse files Browse the repository at this point in the history
bug fix: 修复update_remark方法传参问题
  • Loading branch information
Lingghh authored Dec 14, 2022
2 parents bbc1a32 + 0f0b99c commit a8a912e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/projects/main/apps/codeproj/core/projmgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ def delete_project(cls, repo_id, project_id, user):
logger.info("[User: %s] 在 %s 删除了 %s 分支项目" % (user.username, deleted_time, project))
project.branch = ("deleted by %s(%s)" % (user.username, deleted_time))[:198]
project.status = models.Project.StatusEnum.DISACTIVE
project.update_remark({"branch": old_branch})
project.update_remark(**{"branch": old_branch})
project.save()
project.delete(user=user)
OperationRecordHandler.add_project_operation_record(
Expand Down
2 changes: 1 addition & 1 deletion server/projects/main/apps/codeproj/serializers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ def update(self, instance, validated_data):
user = self.context["request"].user
status = validated_data.get("status")
if status == models.Project.StatusEnum.ARCHIVED_WITHOUT_CLEAN:
instance.update_remark({
instance.update_remark(**{
"archived_time": str(localnow()),
"clean_time": str(localnow() + settings.PROJECT_ARCHIVE_CLEAN_TIMEOUT)})
elif status == models.Project.StatusEnum.ACTIVE \
Expand Down

0 comments on commit a8a912e

Please sign in to comment.