Skip to content

Commit

Permalink
tenant: segment external_id is not null, allow segments to be created in
Browse files Browse the repository at this point in the history
OS platform if no external_id is present.
  • Loading branch information
pritesh committed Jun 17, 2016
1 parent 685833b commit ab46ef8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tenant/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ func (tenantStore *tenantStore) addSegment(tenantId uint64, segment *Segment) er
}
segment.Seq = uint64(len(segments))

if segment.ExternalID == "" {
segment.ExternalID = segment.Name
}

tenantStore.DbStore.Db.NewRecord(*segment)
err = common.MakeMultiError(db.GetErrors())
if err != nil {
Expand Down

0 comments on commit ab46ef8

Please sign in to comment.