mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Allow multiple primary key fields to be specified for processing tests
`
This commit is contained in:
parent
c750cb2154
commit
e9fd409552
@ -105,7 +105,11 @@ class TestCase(_TestCase):
|
||||
|
||||
def sort_by_pk_or_fid(f):
|
||||
if 'pk' in kwargs and kwargs['pk'] is not None:
|
||||
return f[kwargs['pk']]
|
||||
key = kwargs['pk']
|
||||
if isinstance(key, list) or isinstance(key, tuple):
|
||||
return [f[k] for k in key]
|
||||
else:
|
||||
return f[kwargs['pk']]
|
||||
else:
|
||||
return f.id()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user