diff options
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go index 317f936ece..a37923c8b1 100644 --- a/models/repo.go +++ b/models/repo.go @@ -372,6 +372,13 @@ func RepoPath(userName, repoName string) string { } func UpdateRepository(repo *Repository) error { + if len(repo.Description) > 255 { + repo.Description = repo.Description[:255] + } + if len(repo.Website) > 255 { + repo.Website = repo.Website[:255] + } + _, err := orm.Id(repo.Id).UseBool().Cols("description", "website").Update(repo) return err } |