forked from rDrama/rDrama
gfMerge branch 'frost' of https://github.com/Aevann1/Drama into frost
commit
45157a0f54
|
@ -86,12 +86,16 @@ class Comment(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def options(self):
|
def options(self):
|
||||||
return [x for x in self.child_comments if x.author_id == AUTOPOLLER_ID]
|
li = [x for x in self.child_comments if x.author_id == AUTOPOLLER_ID]
|
||||||
|
return sorted(li, key=lambda x: x.id)
|
||||||
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def choices(self):
|
def choices(self):
|
||||||
return [x for x in self.child_comments if x.author_id == AUTOCHOICE_ID]
|
li = [x for x in self.child_comments if x.author_id == AUTOCHOICE_ID]
|
||||||
|
return sorted(li, key=lambda x: x.id)
|
||||||
|
|
||||||
|
|
||||||
def total_poll_voted(self, v):
|
def total_poll_voted(self, v):
|
||||||
if v:
|
if v:
|
||||||
|
|
|
@ -88,12 +88,14 @@ class Submission(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def options(self):
|
def options(self):
|
||||||
return g.db.query(Comment).filter_by(parent_submission = self.id, author_id = AUTOPOLLER_ID, level=1)
|
return g.db.query(Comment).filter_by(parent_submission = self.id, author_id = AUTOPOLLER_ID, level=1).order_by(Comment.id)
|
||||||
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def choices(self):
|
def choices(self):
|
||||||
return g.db.query(Comment).filter_by(parent_submission = self.id, author_id = AUTOCHOICE_ID, level=1)
|
return g.db.query(Comment).filter_by(parent_submission = self.id, author_id = AUTOCHOICE_ID, level=1).order_by(Comment.id)
|
||||||
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
|
|
Loading…
Reference in New Issue