fix(handlers): improve tags validation in bulk update
Changed HandleBulkUpdate to check tags array length before assignment instead of checking for nil, improving consistency with array handling and preparing for dual-field normalization implementation.
This commit is contained in:
@@ -501,7 +501,7 @@ func (h *MediaHandler) HandleBulkUpdate(c echo.Context) error {
|
||||
if update.Updates.Language != nil {
|
||||
updateParams.Language = pgtype.Text{String: *update.Updates.Language, Valid: true}
|
||||
}
|
||||
if update.Updates.Tags != nil && len(update.Updates.Tags) > 0 {
|
||||
if len(update.Updates.Tags) > 0 {
|
||||
updateParams.Tags = update.Updates.Tags
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user