FIX Mirror validate bug

This commit is contained in:
Jasder 2020-06-23 15:08:55 +08:00
parent 1d827580ff
commit 5f283b3cdf
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ class Mirror < ApplicationRecord
# 0: 同步镜像成功1: 正在同步镜像2: 同步失败默认值为0 # 0: 同步镜像成功1: 正在同步镜像2: 同步失败默认值为0
enum status: { succeeded: 0, waiting: 1, failed: 2 } enum status: { succeeded: 0, waiting: 1, failed: 2 }
belongs_to :repository belongs_to :repository, foreign_key: :repo_id
def set_status!(status=Mirror.statuses[:succeeded]) def set_status!(status=Mirror.statuses[:succeeded])