allura
修訂 | a6d20c4a49f3381ec26ec3b89c1d2d7826c2bd17 (tree) |
---|---|
時間 | 2010-09-23 00:49:24 |
作者 | Rick Copeland <rcopeland@geek...> |
Commiter | Rick Copeland |
[#959] - fix the missing whereclause delete problem for hosted apps
@@ -100,11 +100,12 @@ class HostedApp(object): | ||
100 | 100 | if user is None: user = c.user |
101 | 101 | if project is None: project = c.project |
102 | 102 | self._queue_ha_operation('hostedapp_disable', user, project) |
103 | - stmt = T.feature_optin.delete() | |
104 | - stmt.execute( | |
105 | - feature_type=self.feature_type, | |
106 | - owner_table='project', | |
107 | - owner_pk=project.get_tool_data('sfx', 'group_id')) | |
103 | + stmt = T.feature_optin.delete( | |
104 | + whereclause=sa.and_( | |
105 | + T.feature_optin.c.feature_type==self.feature_type, | |
106 | + T.feature_optin.c.owner_table=='project', | |
107 | + T.feature_optin.c.owner_pk==project.get_tool_data('sfx', 'group_id'))) | |
108 | + stmt.execute() | |
108 | 109 | |
109 | 110 | def addperm(self, user=None, project=None): |
110 | 111 | if user is None: user = c.user |