projects
/
kraftakt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0609992
)
Package gfit: Return immediately when no activities are set.
author
Florian Forster
<ff@octo.it>
Wed, 24 Jan 2018 19:51:09 +0000
(20:51 +0100)
committer
Florian Forster
<ff@octo.it>
Wed, 24 Jan 2018 19:51:09 +0000
(20:51 +0100)
gfit/gfit.go
patch
|
blob
|
history
diff --git
a/gfit/gfit.go
b/gfit/gfit.go
index
fb66862
..
d1aacb6
100644
(file)
--- a/
gfit/gfit.go
+++ b/
gfit/gfit.go
@@
-230,6
+230,10
@@
func (a Activity) String() string {
}
func (c *Client) SetActivities(ctx context.Context, activities []Activity, startOfDay time.Time) error {
+ if len(activities) == 0 {
+ return nil
+ }
+
dataStreamID := DataStreamID(&fitness.DataSource{
DataType: &fitness.DataType{
Name: dataTypeNameActivitySegment,