diff --git a/gophish/api/api.py b/gophish/api/api.py index 201420a..8c39821 100644 --- a/gophish/api/api.py +++ b/gophish/api/api.py @@ -94,7 +94,7 @@ def put(self, resource): response = self.api.execute("PUT", endpoint, json=resource.as_json()) - if not respose.ok: + if not response.ok: return Error.parse(response.json()) return self._cls.parse(response.json()) diff --git a/gophish/models.py b/gophish/models.py index 8a56edf..87b2297 100644 --- a/gophish/models.py +++ b/gophish/models.py @@ -22,7 +22,7 @@ def as_dict(self): if isinstance(val, datetime): val = val.isoformat() # Parse custom classes - elif val and not isinstance(val, (int, float, str, list, dict, unicode)): + elif val and not isinstance(val, (int, float, str, list, dict)): val = val.as_dict() # Parse lists of objects elif isinstance(val, list):