Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to datetime for "date" CustomFields #138

Closed
ehooo opened this issue Jan 13, 2020 · 0 comments
Closed

Add support to datetime for "date" CustomFields #138

ehooo opened this issue Jan 13, 2020 · 0 comments
Milestone

Comments

@ehooo
Copy link

ehooo commented Jan 13, 2020

Feature Request

Add support on CustomJsonEncoder for datetime objects

Work Environment

Question Answer
TheHive4py version / git hash 1.6.0

Problem Description

The JsonEncoder not support datetime objects used on CustomFields

Steps to Reproduce

  1. Run the code:
custom_fields = CustomFieldHelper()
custom_fields.add_date('date', datetime.now())
case = Case(title='Example', description='description', customFields=custom_fields.build())
api.create_case(case)

Possible Solutions

Improve object CustomJsonEncoder allowing the datetime objects

ehooo added a commit to ehooo/TheHive4py that referenced this issue Jan 14, 2020
@ehooo ehooo changed the title Support for datetime for "date" CustomFields Add support to datetime for "date" CustomFields Jan 14, 2020
@nadouani nadouani added this to the 1.7.0 milestone Feb 24, 2020
nadouani pushed a commit that referenced this issue May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants