Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Commit

Permalink
fixing a bug whereby 'self' attribute does is not returned when using…
Browse files Browse the repository at this point in the history
… sqla
  • Loading branch information
jstoiko committed Apr 17, 2015
1 parent 85cba0a commit 9b14245
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nefertari/scripts/post2api.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ def load_singular_objects(inputfile, destination):
json_data = json.load(json_file)
objects_count = len(json_data)

query_string = '?_limit={}&_fields={}'.format(objects_count, id_field)
query_string = '?_limit={}'.format(objects_count, id_field)
parent_objects = requests.get(parent_route + query_string).json()['data']

for parent in parent_objects:
print parent_route
parent_url = parent['self'].replace(query_string, '')
singular_url = parent_url + '/' + singlular_field
child = json_data.pop()
Expand Down

0 comments on commit 9b14245

Please sign in to comment.