#32593: Functional Index Based on Newly Created Field, invalid input syntax for type integer: "none" -----------------------------+-------------------------------------- Reporter: mureytasroc | Owner: nobody Type: Bug | Status: closed Component: Migrations | Version: 3.2 Severity: Normal | Resolution: invalid Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------+-------------------------------------- Changes (by Mariusz Felisiak):
* status: new => closed * resolution: => invalid Comment: You cannot `Cast()` to `DecimalField`, or use it in `output_field`, without providing `decimal_places` and `max_digits` arguments, e.g. `DecimalField(decimal_places=2, max_digits=10)` works for me. Also, as far as I'm aware there is no need to use `Cast()` in your case: {{{ ... then=F("registration_volume") / F("capacity"), ... }}} -- Ticket URL: <https://code.djangoproject.com/ticket/32593#comment:1> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.a042131b6468ea385b12723aabde9766%40djangoproject.com.