mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 19:39:19 +00:00
Fix bug causing mediatype to always be Photo
This commit is contained in:
@@ -54,7 +54,7 @@ func (m *Media) AfterFind(tx *gorm.DB) error {
|
||||
lowercasedType := strings.ToLower(string(m.Type))
|
||||
foundType := false
|
||||
for _, t := range AllMediaType {
|
||||
if strings.ToLower(string(m.Type)) == lowercasedType {
|
||||
if strings.ToLower(string(t)) == lowercasedType {
|
||||
m.Type = t
|
||||
foundType = true
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user