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

Handle full date and time for AMO's last_login #728

Open
jwhitlock opened this issue Jun 15, 2021 · 0 comments
Open

Handle full date and time for AMO's last_login #728

jwhitlock opened this issue Jun 15, 2021 · 0 comments

Comments

@jwhitlock
Copy link
Contributor

CTMS expects a date for AMO's last_login, and raises an error when passed a date with time. The fix is one or more of:

  1. Convert datetimes to dates in Basket
  2. Get AMO to convert to a date
  3. Allow a datetime in CTMS and convert to a date
  4. Change CTMS to a datetime

CTMS rejected a PATCH update with data similar to this:

{
  "amo": {
    "display_name": "Name with Kanji and emoji",
    "last_login": "2021-06-15T15:20:22Z",
    "location": "A sentence.",
    "user_id": 123
  }
}

The error:

[
    {
        "msg": "unhashable type: 'dict'", 
        "loc": ["body", "amo"], 
        "type": "type_error"
    }, 
    {
        "msg": "invalid date format", 
        "loc": ["body", "amo", "last_login"], 
        "type": "value_error.date"
    }
]
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

1 participant