Skip to content

Commit 2d3ccfc

Browse files
martindubejordan-wright
authored andcommitted
Fixed AttributeErrors due to small errors (gophish#4)
1 parent 714207f commit 2d3ccfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gophish/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def as_dict(self):
2020
if isinstance(val, datetime):
2121
val = val.isoformat()
2222
# Parse custom classes
23-
elif val and not isinstance(val, (str, list, dict)):
23+
elif val and not isinstance(val, (int, float, str, list, dict)):
2424
val = val.as_dict()
2525
# Parse lists of objects
2626
elif isinstance(val, list):
@@ -91,7 +91,7 @@ def parse(cls, json):
9191
return result
9292

9393

94-
class TimelineEntry(object):
94+
class TimelineEntry(Model):
9595
_valid_properties = {'email': None, 'time': None, 'message': None, 'details': None}
9696

9797
@classmethod

0 commit comments

Comments
 (0)