Backend: Fix bug in addLabels function

This commit is contained in:
Theresa Gresch 2020-05-12 11:52:46 +02:00
parent 96208d2c51
commit 687c85ed73

View file

@ -415,7 +415,7 @@ func (m *Photo) AddLabels(labels classify.Labels) {
plm := NewPhotoLabel(m.ID, lm.ID, label.Uncertainty, label.Source).FirstOrCreate()
if plm.Uncertainty > label.Uncertainty && plm.Uncertainty > 100 {
if plm.Uncertainty > label.Uncertainty && plm.Uncertainty < 100 {
plm.Uncertainty = label.Uncertainty
plm.LabelSrc = label.Source
if err := Db().Save(&plm).Error; err != nil {