main
Bob Mottram 2019-11-29 13:54:25 +00:00
parent 9c8702133b
commit be96800473
1 changed files with 2 additions and 2 deletions

View File

@ -847,14 +847,14 @@ def createQuestionPost(baseDir: str,
False,None,None,subject, \
None,None,None)
messageJson['object']['type']='Question'
messageJson['object']['oneof']=[]
messageJson['object']['oneOf']=[]
messageJson['object']['votersCount']=0
currTime=datetime.datetime.utcnow()
daysSinceEpoch=int((currTime - datetime.datetime(1970,1,1)).days + durationDays)
endTime=datetime.datetime(1970,1,1) + datetime.timedelta(daysSinceEpoch)
messageJson['object']['endTime']=endTime.strftime("%Y-%m-%dT%H:%M:%SZ")
for questionOption in qOptions:
messageJson['object']['oneof'].append({
messageJson['object']['oneOf'].append({
"type": "Note",
"name": questionOption,
"replies": {