summaryrefslogtreecommitdiffstats
path: root/models/unit.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-04-25 17:00:34 +0800
committerGitHub <noreply@github.com>2019-04-25 17:00:34 +0800
commit65b3f513c3d9d9488475f03408f0ba628363a599 (patch)
tree6a4e32b8139e8c3333c38ad57452b5bf4f4d438a /models/unit.go
parentdabee9b1a4347b0003c36f0f2a0548e5fa4002f7 (diff)
downloadgitea-65b3f513c3d9d9488475f03408f0ba628363a599.tar.gz
gitea-65b3f513c3d9d9488475f03408f0ba628363a599.zip
fix new team 500 (#6749)
* fix new team 500 * Update models/unit.go Co-Authored-By: lunny <xiaolunwen@gmail.com>
Diffstat (limited to 'models/unit.go')
-rw-r--r--models/unit.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/unit.go b/models/unit.go
index a8ddf285da..697df696bc 100644
--- a/models/unit.go
+++ b/models/unit.go
@@ -25,6 +25,11 @@ const (
UnitTypeExternalTracker // 7 ExternalTracker
)
+// Value returns integer value for unit type
+func (u UnitType) Value() int {
+ return int(u)
+}
+
func (u UnitType) String() string {
switch u {
case UnitTypeCode: