Custom Query (1173 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (232 - 234 of 1173)

Ticket Resolution Summary Owner Reporter
#552 fixed GMGTableBase uses default kwarg of {} in methods nyergler nyergler
Description

A few places in GMGTableBase have method definitions that look something like:

    def find_one(cls, query_dict={}):
       ...

This is almost certainly not what the authors intended. The default argument list is only evaluated once during execution, at import time. The code above creates a single dictionary as the default, and if this is mutated down the line, the mutated value becomes the default for subsequent calls. In these particular cases it's unlikely to cause problems -- that argument will almost certainly be passed in -- but in the event it's not, this can cause very strange, difficult to diagnose behavior. The correct approach is to use an immutable value as an argument default.

Note that this same problem exists for class level attributes: defining a class such as:

    class Foo(object):

        bar = {}

means that for *every* instance of Foo, self.bar will point to the *same* dict.

#783 fixed bin/gmg command adduser generates a minor unnecessary error NattilyPidgin
Description

Whenever bin/gmg adduser is used, a minor error is raised because the code filters the User table for a unicode string using a non-unicode string. This is the error that is raised:

mediagoblin/local/lib/python2.7/site-packages/SQLAlchemy-0.8.2-py2.7-linux-i686.egg/sqlalchemy/engine/default.py:459: SAWarning: Unicode type received non-unicode bind param value.
  param.append(processors[key](compiled_params[key]))

This doesn't affect functionality at all, but may be confusing if unfixed.

#681 fixed replace mediagoblin.ini for mediagoblin.ini.sample nico cesar
Description

I feel more natural using ".sample" suffix instead of having 2 confusing .ini files

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.