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

Empty Date Time field causes TypeError #148

Closed
natsumi opened this issue Sep 20, 2017 · 4 comments
Closed

Empty Date Time field causes TypeError #148

natsumi opened this issue Sep 20, 2017 · 4 comments

Comments

@natsumi
Copy link

natsumi commented Sep 20, 2017

An empty datefield will cause a typeerror. Same issue as #18

@dlitvakb
Copy link
Contributor

Hey @natsumi,

Could you please let me know which version of the gem are you using?

Also, do you have a code snippet to reproduce this issue?

Cheers

@natsumi
Copy link
Author

natsumi commented Sep 20, 2017

I'm using version 2.1.0 but the issue persists even with 2.1.3. I'm just running a basic filter:

      filter = {
        skip: skip,
        limit: limit,
        order: 'fields.publishDateTime',
      }

However, one of the entries come back with a nil date time field (which is not required) and it causes line 62 in lib/contentful/coercions.rb to throw a TypeError because value is now nil.

@dlitvakb
Copy link
Contributor

Hey @natsumi,

This looks like it may indeed be a bug,

I'll take a look into it and check what may be happening.

Cheers

@jacobduursma
Copy link

Hey @dlitvakb

Not sure if you had time to fix yet? Looks like the bug is still there, just been having the same issue (version 2.3.0).

Cheers

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

3 participants