Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/kar 356 insided tap sync user activities #2

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion tap_insided/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
'user_activities': {
'path': '/user/activity',
'pk': ['event_uuid'],
'number_indexed': True,
'is_list': True,
'unix_timestamps': True
}
}
24 changes: 1 addition & 23 deletions tap_insided/schemas/user_activities.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,28 +88,6 @@
"null",
"boolean"
]
},
"pageinfo": {
"type": [
"null",
"object"
],
"additionalProperties": false,
"properties": {
"post_id": {
"type": [
"null",
"string"
]
}
}
},
"time_processed": {
"type": [
"null",
"string"
],
"format": "date-time"
}
}
}
}
3 changes: 3 additions & 0 deletions tap_insided/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def sync_endpoint(client,
records.append(value)
except:
pass
elif endpoint.get('is_list', False) == True:
if isinstance(data, list):
records = data
else:
records = data['result']
if not isinstance(records, list):
Expand Down