Skip to content

Commit dcd6884

Browse files
Merge pull request #4 from shotstack/production_patch
Added patch files
2 parents 5dfb57e + a583920 commit dcd6884

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

patches/model_utils.patch

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
diff --git a/shotstack_sdk/model_utils.py b/model_utils.py
2+
index bb97211..eb381f6 100644
3+
--- a/shotstack_sdk/model_utils.py
4+
+++ b/model_utils.py
5+
@@ -250,6 +250,7 @@ class OpenApiModel(object):
6+
# Get the name and value of the discriminator property.
7+
# The discriminator name is obtained from the discriminator meta-data
8+
# and the discriminator value is obtained from the input data.
9+
+
10+
discr_propertyname_py = list(cls.discriminator.keys())[0]
11+
discr_propertyname_js = cls.attribute_map[discr_propertyname_py]
12+
if discr_propertyname_js in kwargs:
13+
@@ -372,7 +373,12 @@ class OpenApiModel(object):
14+
# The discriminator name is obtained from the discriminator meta-data
15+
# and the discriminator value is obtained from the input data.
16+
discr_propertyname_py = list(cls.discriminator.keys())[0]
17+
+ if not discr_propertyname_py in cls.attribute_map:
18+
+ return None
19+
+
20+
discr_propertyname_js = cls.attribute_map[discr_propertyname_py]
21+
+
22+
+
23+
if discr_propertyname_js in kwargs:
24+
discr_value = kwargs[discr_propertyname_js]
25+
elif discr_propertyname_py in kwargs:

patches/render_response_data.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/shotstack_sdk/model/render_response_data.py b/render_response_data.py
2+
index 49d7a25..8696157 100644
3+
--- a/shotstack_sdk/model/render_response_data.py
4+
+++ b/render_response_data.py
5+
@@ -224,7 +224,7 @@ class RenderResponseData(ModelNormal):
6+
if var_name not in self.attribute_map and \
7+
self._configuration is not None and \
8+
self._configuration.discard_unknown_keys and \
9+
- self.additional_properties_type is None:
10+
+ self.additional_properties_type is None or var_value is None:
11+
# discard variable.
12+
continue
13+
setattr(self, var_name, var_value)

0 commit comments

Comments
 (0)