allow polls with the same text

pull/142/head
Aevann 2023-03-23 17:52:31 +02:00
parent 2b7d122fd8
commit 5c071b749a
1 changed files with 5 additions and 1 deletions

View File

@ -507,6 +507,8 @@ def process_poll_options(v:User, target:Union[Submission, Comment]):
option_count = 0
option_objects = []
for pattern, exclusive in patterns:
for i in pattern.finditer(target.body):
option_count += 1
@ -538,4 +540,6 @@ def process_poll_options(v:User, target:Union[Submission, Comment]):
body_html=body_html,
exclusive=exclusive,
)
g.db.add(option)
option_objects.append(option)
g.db.add_all(option_objects)