Prevent error when there is no new OSM data to insert
This commit is contained in:
parent
d4fafb46e7
commit
1905951cab
12
init.org
12
init.org
|
@ -1963,11 +1963,9 @@ When I clock out of the "OSM" task, this code stores changeset details in it.
|
|||
if (equal id last-id)
|
||||
return (reverse changesets)
|
||||
else collect
|
||||
(list
|
||||
:osm-url
|
||||
(my-make-osm-url id)
|
||||
:osm-comment
|
||||
(my-get-changeset-comment changeset)) into changesets)
|
||||
(list :osm-url (my-make-osm-url id)
|
||||
:osm-comment (my-get-changeset-comment changeset))
|
||||
into changesets)
|
||||
;; no changeset information in file - just use
|
||||
;; the latest changeset from the response
|
||||
(let* ((changeset (first response-changesets))
|
||||
|
@ -1979,7 +1977,9 @@ When I clock out of the "OSM" task, this code stores changeset details in it.
|
|||
(chronometrist-latest-record (chronometrist-active-backend))
|
||||
`(:changesets ,new-changesets))))
|
||||
;; (message "Last changeset ID - %s" last-id)
|
||||
(chronometrist-replace-last (chronometrist-active-backend) new-plist)))
|
||||
;; don't update if the latest changeset ID was already recorded
|
||||
(when new-changesets
|
||||
(chronometrist-replace-last (chronometrist-active-backend) new-plist))))
|
||||
#+END_SRC
|
||||
|
||||
***** my-save-osm-changeset-details
|
||||
|
|
Loading…
Reference in New Issue