mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-13 07:29:39 +00:00
Storage/S3: Add missing DISTINCT to query
This commit is contained in:
parent
55d4de2efb
commit
f75fd081ff
@ -52,7 +52,7 @@ class RHBuckets(RH):
|
||||
def _get_dynamic_info(self, backend_name, storage):
|
||||
buckets = set()
|
||||
for model in StoredFileMixin.__subclasses__():
|
||||
query = (db.session.query(db.func.split_part(model.storage_file_id, '//', 1))
|
||||
query = (db.session.query(db.func.split_part(model.storage_file_id, '//', 1).distinct())
|
||||
.filter(model.storage_file_id.isnot(None), model.storage_backend == backend_name))
|
||||
buckets.update(bucket for bucket, in query)
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ from setuptools import find_packages, setup
|
||||
|
||||
setup(
|
||||
name='indico-plugin-storage-s3',
|
||||
version='2.0',
|
||||
version='2.0.1',
|
||||
description='S3 storage backend for Indico',
|
||||
url='https://github.com/indico/indico-plugins',
|
||||
license='https://www.gnu.org/licenses/gpl-3.0.txt',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user