Backend: Code clean-up
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
404682b730
commit
95cc4ec43f
2 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ func TestNewLens(t *testing.T) {
|
|||
lens := NewLens("", "")
|
||||
assert.Equal(t, "Unknown", lens.LensModel)
|
||||
assert.Equal(t, "", lens.LensMake)
|
||||
assert.Equal(t, "zz", lens.LensSlug)
|
||||
assert.Equal(t, UnknownLens.LensSlug, lens.LensSlug)
|
||||
assert.Equal(t, &UnknownLens, lens)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ func (m *Photo) UpdateLocation(db *gorm.DB, geoApi string) (keywords []string, l
|
|||
m.PlaceID = UnknownPlace.ID
|
||||
}
|
||||
|
||||
if m.Place != nil && (m.PhotoCountry == "" || m.PhotoCountry == "zz") {
|
||||
if m.Place != nil && (m.PhotoCountry == "" || m.PhotoCountry == UnknownCountry.Code()) {
|
||||
m.PhotoCountry = m.Place.LocCountry
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue