Fix bug causing mediatype to always be Photo
This commit is contained in:
parent
7f885fa63e
commit
f6f7377096
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue