Browse Source

Merge branch 'V20211101' into sync_failed_status

tags/v1.21.12.1
ychao_1983 4 years ago
parent
commit
bae1f79b77
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      models/cloudbrain.go
  2. +1
    -1
      modules/base/tool.go

+ 1
- 1
models/cloudbrain.go View File

@@ -698,7 +698,7 @@ func GetCloudbrainByName(jobName string) (*Cloudbrain, error) {
}

func CanDelJob(isSigned bool, user *User, job *CloudbrainInfo) bool {
if !isSigned || job.Status != string(JobStopped) {
if !isSigned || (job.Status != string(JobStopped) && job.Status != string(ModelArtsStartFailed) && job.Status != string(ModelArtsCreateFailed)){
return false
}
repo, err := GetRepositoryByID(job.RepoID)


+ 1
- 1
modules/base/tool.go View File

@@ -224,7 +224,7 @@ func SizedAvatarLinkWithDomain(email string, size int) string {

// FileSize calculates the file size and generate user-friendly string.
func FileSize(s int64) string {
return humanize.IBytes(uint64(s))
return humanize.Bytes(uint64(s))
}

// PrettyNumber produces a string form of the given number in base 10 with


Loading…
Cancel
Save