Skip to content

Commit 20e21c9

Browse files
mshaileshr@gmail.commshaileshr@gmail.com
authored andcommitted
v1.1.0 updated include_reference in Queryable class
1 parent d30e2f7 commit 20e21c9

File tree

5 files changed

+10
-18
lines changed

5 files changed

+10
-18
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Python package
55

66
on:
77
push:
8-
branches: [ master, 1.0.0 ]
8+
branches: [ master, v1.1.0 ]
99
pull_request:
10-
branches: [ master, 1.0.0 ]
10+
branches: [ master, v1.1.0 ]
1111

1212
jobs:
1313
build:

contentstack/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
__author__ = 'Contentstack'
1010
__status__ = 'debug'
11-
__version__ = '1.0.0'
11+
__version__ = '1.1.0'
1212
__endpoint__ = 'cdn.contentstack.io'
1313
__email__ = 'mshaileshr@gmail.com'

contentstack/entryqueryable.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ class EntryQueryable:
77

88
def __init__(self):
99
self.entry_queryable_param = {}
10-
self.entry_include_array = []
11-
self.entry_include_dict = {}
1210

1311
def locale(self, locale: str):
1412
"""
@@ -50,7 +48,7 @@ def only(self, field_uid: str):
5048
"""
5149
if field_uid is not None:
5250
if isinstance(field_uid, str):
53-
self.entry_queryable_param['only[BASE][]'] = [field_uid]
51+
self.entry_queryable_param['only[BASE][]'] = field_uid
5452
else:
5553
raise KeyError("Invalid field_uid provided")
5654
return self
@@ -64,7 +62,7 @@ def excepts(self, field_uid: str):
6462
"""
6563
if field_uid is not None:
6664
if isinstance(field_uid, str):
67-
self.entry_queryable_param['except[BASE][]'] = [field_uid]
65+
self.entry_queryable_param['except[BASE][]'] = field_uid
6866
else:
6967
raise KeyError("Invalid field_uid provided")
7068
return self
@@ -87,9 +85,7 @@ def include_reference(self, field_uid):
8785
Returns:
8886
self -- So you can chain this call.
8987
"""
90-
if field_uid is not None and isinstance(field_uid, str):
91-
self.entry_queryable_param["include[]"] = [field_uid]
92-
if field_uid is not None and isinstance(field_uid, list) and len(field_uid) > 0:
88+
if field_uid is not None and isinstance(field_uid, (str, list)):
9389
self.entry_queryable_param["include[]"] = field_uid
9490
return self
9591

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
docutils~=0.16
22
dnspython~=2.0.0
33
idna~=2.10
4-
pip~=20.2
4+
pip~=20.2.1
55
wheel~=0.34.2
6-
keyring~=21.2.1
6+
keyring~=21.3.0
77
pytz~=2020.1
88
Babel~=2.8.0
99
pkginfo~=1.5.0.1
@@ -23,7 +23,7 @@ toml~=0.10.1
2323
urllib3~=1.25.10
2424
alabaster~=0.7.12
2525
pyparsing~=3.0.0.a2
26-
setuptools~=49.2.0
26+
setuptools~=49.2.1
2727
zipp~=3.1.0
2828
html-testRunner~=1.2.1
2929
py~=1.9.0

setup.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,10 @@
1313
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
1414
long_description = readme.read()
1515

16-
import setuptools
17-
with open("README.md", "r") as fh:
18-
long_description = fh.read()
19-
2016
setup(
2117
name="contentstack",
2218
keywords='contentstack-python',
23-
version="1.0.0",
19+
version="1.1.0",
2420
author="contentstack",
2521
author_email="mshaileshr@gmail.com",
2622
description="Contentstack is a headless CMS with an API-first approach.",

0 commit comments

Comments
 (0)