Skip to content

Commit

Permalink
Raise tag limit for objects
Browse files Browse the repository at this point in the history
With the increased use of tags esp. for semantic distinction of posts
the current limit turns out to be not sufficient when semantic tags are
mixed with user input. There might be an opportunity to split those
apart to avoid unnecessary side-effects.
  • Loading branch information
Alexander Simmerl committed Dec 6, 2016
1 parent 4b9cefd commit 9d12ff9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion service/object/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (o *Object) Validate() error {
)
}

if len(o.Tags) > 5 {
if len(o.Tags) > 25 {
return wrapError(ErrInvalidObject, "too many tags")
}

Expand Down
19 changes: 0 additions & 19 deletions service/object/object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,25 +79,6 @@ func TestObjectValidate(t *testing.T) {
Type: "post",
Visibility: VisibilityConnection,
},
// Too many Tags
{
OwnerID: 123,
Tags: []string{
"tag",
"tag",
"tag",
"tag",
"tag",
"tag",
"tag",
"tag",
"tag",
"tag",
"tag",
},
Type: "post",
Visibility: VisibilityConnection,
},
// Missing Type
{
OwnerID: 123,
Expand Down

0 comments on commit 9d12ff9

Please sign in to comment.