= phenomenon =
fas cannot filter config information by username
= reason =
Bug in code that tries to compare to a field that's in a different table.
= recommendation =
Hotfix of the fas/configs.py file pushed that implements the following patch:
{{{ diff --git a/fas/configs.py b/fas/configs.py index 7a1ea12..c977eb6 100644 --- a/fas/configs.py +++ b/fas/configs.py @@ -137,7 +137,7 @@ class Config(controllers.Controller): # pylint: disable-msg=E1101 cfgs = Configs.query.filter_by(application=application).filter( and_(Configs.attribute.like(pattern), - People.username==username)) + Configs.person_id==target.id)) # pylint: enable-msg=E1101 results = dict((cfg.attribute, cfg.value) for cfg in cfgs.all())
@@ -174,7 +174,7 @@ class Config(controllers.Controller): try: # pylint: disable-msg=E1101 config = Configs.query.filter_by(application=application, - attribute=attribute).filter(People.username==username).one() + attribute=attribute).filter(Configs.person_id==target.id).one() config.value = value except InvalidRequestError: # There was no Config, create a new one
}}}
Has been checked into fas master for the next release.
Fix deployed