mirror of
https://github.com/alerta/alerta.git
synced 2025-05-17 14:42:22 +00:00
Allow users to belong to multiple customers (#500)
This commit is contained in:
parent
9b00d9ee7b
commit
7f0413cf5d
36 changed files with 145 additions and 138 deletions
alerta/database/backends/postgres
|
@ -24,9 +24,9 @@ class QueryBuilderImpl(QueryBuilder):
|
|||
qvars = dict()
|
||||
|
||||
# customer
|
||||
if g.get('customer', None):
|
||||
query.append('AND customer=%(customer)s')
|
||||
qvars['customer'] = g.get('customer')
|
||||
if g.get('customers', None):
|
||||
query.append('AND customer=ANY(%(customers)s)')
|
||||
qvars['customers'] = g.get('customers')
|
||||
|
||||
# from-date, to-date
|
||||
from_date = params.get('from-date', default=None, type=DateTime.parse)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue