← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 625896] Re: exception if fields.py if no _context

 

Hello Guys,

   It has been fixed by revision 2877
ach@xxxxxxxxxxx-20101015103003-34eytuy07mu8pt1s

Thanks a lot for your contributions. 
We really do appreciate that. Keep posting.

** Changed in: openobject-server
       Status: New => Fix Released

** Changed in: openobject-server
    Milestone: None => 6.0

** Changed in: openobject-server
     Assignee: (unassigned) => Anup (OpenERP) (ach-openerp)

-- 
exception if fields.py if no _context
https://bugs.launchpad.net/bugs/625896
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP OpenObject.

Status in OpenObject Server: Fix Released

Bug description:
I made this change some time ago, and no longer have the traceback.

An exception is thrown in osv/fields.py if self._context is False

The following change fixes the problem:


=== modified file 'bin/osv/fields.py'
--- bin/osv/fields.py   2010-08-13 00:23:21 +0000
+++ bin/osv/fields.py   2010-08-20 18:52:39 +0000
@@ -428,7 +428,10 @@
             context = {}
         if self._context:
             context = context.copy()
-        context.update(self._context)
+        try:
+            context.update(self._context)
+        except:
+            pass
          if not values:
            values = {}

Revision is 2572, trunk