mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 06:51:10 +03:00
ensure last comma removed in select
* We strip out the json select fields in our tests since it is an sql lite database underneath. Ideally, we would do something fancier, but we aren't. In doing this stipping, we could strip the last element in the projection list. This would result in an extra dangling comma. This commit removes the danging comma in the projection list after the removal of JSON projections.
This commit is contained in:
parent
f85bcae89f
commit
ee18400a33
@ -36,6 +36,8 @@ def sqlite_copy_expert(request):
|
||||
for line in sql.split('\n'):
|
||||
if line.find('main_jobevent.event_data::') == -1:
|
||||
sql_new.append(line)
|
||||
elif not line.endswith(','):
|
||||
sql_new[-1] = sql_new[-1].rstrip(',')
|
||||
sql = '\n'.join(sql_new)
|
||||
|
||||
self.execute(sql)
|
||||
|
Loading…
Reference in New Issue
Block a user