forked from 0x2620/pandora
don't pass user as keys
This commit is contained in:
parent
dc0132a913
commit
503ae10e89
2 changed files with 2 additions and 2 deletions
|
@ -96,7 +96,7 @@ class MetaClip(object):
|
||||||
|
|
||||||
clip_keys = ('id', 'in', 'out', 'position', 'created', 'modified',
|
clip_keys = ('id', 'in', 'out', 'position', 'created', 'modified',
|
||||||
'hue', 'saturation', 'lightness', 'volume', 'videoRatio')
|
'hue', 'saturation', 'lightness', 'volume', 'videoRatio')
|
||||||
def json(self, keys=None, qs=None):
|
def json(self, keys=None, qs=None, user=None):
|
||||||
j = {}
|
j = {}
|
||||||
for key in self.clip_keys:
|
for key in self.clip_keys:
|
||||||
j[key] = getattr(self, {
|
j[key] = getattr(self, {
|
||||||
|
|
|
@ -257,7 +257,7 @@ class Edit(models.Model):
|
||||||
def get_clips_json(self, user=None):
|
def get_clips_json(self, user=None):
|
||||||
qs = self.get_clips(user)
|
qs = self.get_clips(user)
|
||||||
if self.type == 'static':
|
if self.type == 'static':
|
||||||
clips = [c.json(user) for c in qs.order_by('index')]
|
clips = [c.json(user=user) for c in qs.order_by('index')]
|
||||||
else:
|
else:
|
||||||
if qs is None:
|
if qs is None:
|
||||||
clips = []
|
clips = []
|
||||||
|
|
Loading…
Reference in a new issue