Skip to content

Commit 7d3a791

Browse files
committed
continuous improvement of data setup
1 parent 6e04036 commit 7d3a791

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

data/model.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ func (model *BaseModel) GetID() string {
3434

3535
// GenID creates a new id for model if its not existent.
3636
func (model *BaseModel) GenID(ctx context.Context) {
37-
if model.ID != "" {
38-
return
37+
if model.ID == "" {
38+
model.ID = util.IDString()
3939
}
4040

41-
model.ID = util.IDString()
42-
4341
authClaim := security.ClaimsFromContext(ctx)
4442
if authClaim == nil {
4543
return

0 commit comments

Comments
 (0)