parser: allow import of dive sites without UUID

Fixes #3493.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-08-29 07:25:21 +02:00 committed by Dirk Hohndel
parent aa4b48f440
commit 6d77d814a8
2 changed files with 7 additions and 6 deletions

View file

@ -1,3 +1,4 @@
import: allow import of divesites without UUID
divelist: do not include planned versions of a dive if there is real data
desktop: fix key composition in tag widgets and dive site widget
mobile: send log files as attachments for support emails on iOS

View file

@ -247,13 +247,13 @@ void dive_site_end(struct parser_state *state)
{
if (!state->cur_dive_site)
return;
if (state->cur_dive_site->uuid) {
struct dive_site *ds = alloc_or_get_dive_site(state->cur_dive_site->uuid, state->sites);
merge_dive_site(ds, state->cur_dive_site);
if (verbose > 3)
printf("completed dive site uuid %x8 name {%s}\n", ds->uuid, ds->name);
}
struct dive_site *ds = alloc_or_get_dive_site(state->cur_dive_site->uuid, state->sites);
merge_dive_site(ds, state->cur_dive_site);
if (verbose > 3)
printf("completed dive site uuid %x8 name {%s}\n", ds->uuid, ds->name);
free_dive_site(state->cur_dive_site);
state->cur_dive_site = NULL;
}