Skip to content

Commit

Permalink
Fix schema creation (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
pijng committed Jul 4, 2024
1 parent b8c6172 commit ceca0ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ info:
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.13.5
version: 1.13.6
externalDocs:
description: Find out more about spec
url: 'https://moonlogs.pages.dev'
Expand Down
2 changes: 1 addition & 1 deletion internal/usecases/schema_usecase.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (uc *SchemaUseCase) CreateSchema(ctx context.Context, schema entities.Schem
}

// update relevant fields if schema by the given name already exists
if existingSchema.ID != 0 {
if existingSchema != nil {
mergedSchema := mergeSchemaFields(*existingSchema, schema)

return uc.schemaStorage.UpdateSchemaByID(ctx, existingSchema.ID, mergedSchema)
Expand Down

0 comments on commit ceca0ff

Please sign in to comment.