Skip to content

Commit 50dc76c

Browse files
committed
Fix bug for ID_NAME in create
1 parent 9f92d57 commit 50dc76c

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
from setuptools import setup, find_packages
22

3+
version = "0.11"
34
setup(name="staffjoy",
45
packages=find_packages(),
5-
version="0.10",
6+
version=version,
67
description="Staffjoy API Wrapper in Python",
78
author="Philip Thomas",
89
author_email="help@staffjoy.com",
910
license="MIT",
1011
url="https://github.com/staffjoy/client_python",
11-
download_url="https://github.com/StaffJoy/client_python/archive/0.10.tar.gz",
12+
download_url="https://github.com/StaffJoy/client_python/archive/%s.tar.gz" % version,
1213
keywords=["staffjoy-api", "staffjoy", "staff joy"],
1314
install_requires=["requests[security]"], )

staffjoy/resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def create(cls, parent=None, **kwargs):
170170

171171
# No envelope on post requests
172172
data = response.json()
173-
obj.route[obj.ID_NAME] = data.get("id")
173+
obj.route[obj.ID_NAME] = data.get("id", obj.ID_NAME)
174174
obj.data = data
175175

176176
return obj

0 commit comments

Comments
 (0)