Compare commits

..

9 commits

Author SHA1 Message Date
j
092c1b3184 followup to dc0132a913: fix check for panel 2018-11-15 11:21:07 +00:00
j
68b2482ede avoid duplicated keys in nested queries 2018-11-15 11:18:26 +00:00
j
83765d91d8 item should only be loaded if item is joined, disable for now 2018-11-15 11:18:00 +00:00
j
c039279984 revert 2018-11-15 11:17:48 +00:00
j
72bb3ba6c1 item should only be loaded if item is joined, disable for now 2018-11-15 11:17:29 +00:00
j
f4aa94f848 enable cache backend 2018-11-15 10:30:17 +00:00
j
3e14795d0b make sure settings are dicts 2018-11-15 10:29:14 +00:00
j
4512b010c6 undo 2018-11-15 10:28:51 +00:00
j
687738ff46 make sure settings are dicts 2018-11-15 10:28:30 +00:00
7 changed files with 19 additions and 4 deletions

View file

@ -145,7 +145,11 @@ class ClipManager(Manager):
keys = layer_ids + ['annotations', 'text', '*']
conditions = data.get('query', {}).get('conditions', [])
conditions = flatten_conditions(conditions)
conditions = list(filter(lambda c: c.get('key') in keys, conditions))
conditions_ = []
for c in conditions:
if c.get('key') in keys and c not in conditions_:
conditions_.append(c)
conditions = conditions_
operator = data.get('query', {}).get('operator', '&')
def parse(condition):

View file

@ -95,7 +95,7 @@ def findClips(request, data):
if 'keys' in data:
qs = order_query(qs, query['sort'])
qs = qs[query['range'][0]:query['range'][1]]
qs = qs.select_related('item')
#qs = qs.select_related('item')
layers = settings.CONFIG['layers']
entity_layer_ids = [k['id'] for k in layers if k['type'] == 'entity']

View file

@ -170,6 +170,13 @@ LOGGING = {
}
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
'LOCATION': 'cache',
}
}
AUTH_PROFILE_MODULE = 'user.UserProfile'
AUTH_CHECK_USERNAME = True
FFMPEG = 'ffmpeg'

View file

@ -785,7 +785,7 @@ def setUI(request, data):
if isinstance(p, list):
p = p[getPositionById(p, key)]
else:
if key not in p:
if key not in p or not isinstance(p[key], dict):
p[key] = {}
p = p[key]
if value == None and keys[0] in p:

View file

@ -10,3 +10,4 @@ requests==2.19.1
tornado<5
geoip2==2.9.0
youtube-dl
python-memcached

View file

@ -100,7 +100,7 @@ pandora.ui.filterForm = function(options) {
id: list.id,
query: that.$filter.options('value')
}, function(result) {
editPanel.updatePanel && pandora.$ui.editPanel.updatePanel();
pandora.$ui.editPanel && pandora.$ui.editPanel.updatePanel();
});
} else {
pandora.$ui.list && pandora.$ui.list

View file

@ -249,6 +249,9 @@ if __name__ == "__main__":
update_service('pandora-tasks')
if old < 5975:
run('./bin/pip', 'install', '-r', 'requirements.txt')
if old <= 6064:
run('./bin/pip', 'install', '-r', 'requirements.txt')
run('./pandora/manage.py', 'createcachetable')
else:
if len(sys.argv) == 1:
release = get_release()