Skip to content

Commit 4534947

Browse files
committed
IDEV-1877: Simplify the condition in retrieving feeds products' data
1 parent 550f39c commit 4534947

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

domaintools/base_results.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ def data(self):
128128
if self._data is None:
129129
results = self._get_results()
130130
self.setStatus(results.status_code, results)
131-
if self.product in get_feeds_products_list():
132-
# Special handling of feeds products' data since the result is in jsonline format
133-
# As much as possible we would like to preserve its format
134-
self._data = results.text
135-
elif self.kwargs.get("format", "json") == "json":
131+
if (
132+
self.kwargs.get("format", "json") == "json"
133+
and self.product
134+
not in get_feeds_products_list() # Special handling of feeds products' data to preserve the result in jsonline format
135+
):
136136
self._data = results.json()
137137
else:
138138
self._data = results.text

0 commit comments

Comments
 (0)