Giter Site home page Giter Site logo

Comments (2)

coordt avatar coordt commented on May 31, 2024

Are you sure you are on 0.8.1? This error existed in 0.8, but I fixed it yesterday morning in 0.8.1.

I can't replicate your example on 0.8.1. Can you double check?

Thanks,

Corey

On Aug 30, 2011, at 1:11 AM, roadhead wrote:

Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from categories.models import Category
>>> c = Category()
>>> c.name = "China"
>>> c.save()
Traceback (most recent call last):
 File "<console>", line 1, in <module>
 File "/bundles/port-8488/app_image/pyenv/lib/python2.7/site-packages/categories/models.py", line 104, in save
   for item in self.get_descendants():
 File "/bundles/port-8488/app_image/pyenv/lib/python2.7/site-packages/mptt/models.py", line 222, in get_descendants
   if not include_self and self.is_leaf_node():
 File "/bundles/port-8488/app_image/pyenv/lib/python2.7/site-packages/mptt/models.py", line 358, in is_leaf_node
   return not self.get_descendant_count()
 File "/bundles/port-8488/app_image/pyenv/lib/python2.7/site-packages/mptt/models.py", line 244, in get_descendant_count
   self._mpttfield('left') - 1) / 2
TypeError: unsupported operand type(s) for -: 'NoneType' and 'NoneType'

This is after upgrading from 0.7.1 to 0.8.1

Reply to this email directly or view it on GitHub:
#24

from django-categories.

sankroh avatar sankroh commented on May 31, 2024

Yep, I noticed that pretty much as soon as I wrote this and then promptly closed the issue.

Thanks!

from django-categories.

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.