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))
|
lowercasedType := strings.ToLower(string(m.Type))
|
||||||
foundType := false
|
foundType := false
|
||||||
for _, t := range AllMediaType {
|
for _, t := range AllMediaType {
|
||||||
if strings.ToLower(string(m.Type)) == lowercasedType {
|
if strings.ToLower(string(t)) == lowercasedType {
|
||||||
m.Type = t
|
m.Type = t
|
||||||
foundType = true
|
foundType = true
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue