Code Monkey home page Code Monkey logo

Comments (8)

dominicrodger avatar dominicrodger commented on August 17, 2024

How do you pass None to a form from the browser? Or are you using a form programmatically?

from django-recurrence.

audiolion avatar audiolion commented on August 17, 2024

I found it during testing yes so the form data was being generated and passed programmatically, I basically added recurrence: '' to the POST.data to fix it, but I expected if I didn't pass the field name to the form post data it wouldn't crash. I wasn't doing recurrence: None in the post data, I didn't include it at all. (The RecurrenceField is called recurrence on my model) So the form cleaning that was done assigns a value of None to the field if it is not present.

from django-recurrence.

dominicrodger avatar dominicrodger commented on August 17, 2024

Ah, OK - that makes sense, thanks @audiolion.

Pull requests to fix this welcome - especially if they contain tests!

from django-recurrence.

audiolion avatar audiolion commented on August 17, 2024

Ok might be a few days but I will send in a patch

from django-recurrence.

dominicrodger avatar dominicrodger commented on August 17, 2024

Sounds good - thanks! No pressure on getting it done, it doesn't sound like it would hit most users of django-recurrence. Don't worry if you can't get tests for it - I'll happily add them to a patch if needed.

from django-recurrence.

pytrumpeter avatar pytrumpeter commented on August 17, 2024

Did this ever get patched? I'm running into this issue now. Thanks.

Edit: I monkey-patched it for now, so no rush. I returned None if a TypeError was thrown in the try/catch, seems to work okay for now, as my Recurrence field is not required.

from django-recurrence.

dominicrodger avatar dominicrodger commented on August 17, 2024

@harveynr - no, I don't think this was ever patched.

from django-recurrence.

dominicrodger avatar dominicrodger commented on August 17, 2024

Fixed by #122.

from django-recurrence.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.