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

Correctly map date, datetime and time #9

Open
jamilraichouni opened this issue Dec 2, 2022 · 0 comments
Open

Correctly map date, datetime and time #9

jamilraichouni opened this issue Dec 2, 2022 · 0 comments
Assignees

Comments

@jamilraichouni
Copy link
Contributor

Refer to:

https://github.com/DSD-DBS/rm-bridge/blob/340309874b90962615ac79ae927840c8e08ab06e/rm_bridge/changeset/change.py#L30

_ATTR_VALUE_DEFAULT_MAP: cabc.Mapping[str, type] = {
    "String": str,
    "Enum": list,
    "Date": datetime.datetime,
    "Integer": int,
    "Float": float,
    "Boolean": bool,
}

Why is a datetime mapped to a date?

I would change that to

_ATTR_VALUE_DEFAULT_MAP: cabc.Mapping[str, type] = {
    "String": str,
    "Enum": list,
    "Date": datetime.date,
    "Date-time": datetime.datetime,
    "Time": datetime.time,
    "Integer": int,
    "Float": float,
    "Boolean": bool,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants