People: Improve "photoprism places update" CLI command #1664

This commit is contained in:
Michael Mayer 2021-11-12 06:32:58 +01:00
parent bb9442e6c4
commit c058c01770
2 changed files with 4 additions and 4 deletions

View file

@ -15,17 +15,17 @@ import (
// PlacesCommand registers the places subcommands.
var PlacesCommand = cli.Command{
Name: "places",
Usage: "Geolocation data subcommands",
Usage: "Location information subcommands",
Subcommands: []cli.Command{
{
Name: "update",
Usage: "Fetches updated location infos",
Usage: "Fetches updated location data",
Action: placesUpdateAction,
},
},
}
// placesUpdateAction fetches updated location infos.
// placesUpdateAction fetches updated location data.
func placesUpdateAction(ctx *cli.Context) error {
start := time.Now()

View file

@ -83,7 +83,7 @@ func (m *Cell) Refresh(api string) (err error) {
// Find existing place by label.
if err := UnscopedDb().Where("place_label = ?", l.Label()).First(&place).Error; err != nil {
log.Error(err)
log.Tracef("places: %s for cell %s", err, m.ID)
place = &Place{ID: m.ID}
} else {
log.Tracef("places: found matching place %s for cell %s", place.ID, m.ID)