Link postId to tag

main
Bob Mottram 2020-02-23 11:22:46 +00:00
parent b97a9861c8
commit c6cf01c16a
1 changed files with 2 additions and 2 deletions

View File

@ -80,6 +80,8 @@ def getTodaysEvents(baseDir: str,nickname: str,domain: str, \
int(eventTime.strftime("%m"))==monthNumber and \ int(eventTime.strftime("%m"))==monthNumber and \
int(eventTime.strftime("%d"))==dayNumber: int(eventTime.strftime("%d"))==dayNumber:
dayOfMonth=str(int(eventTime.strftime("%d"))) dayOfMonth=str(int(eventTime.strftime("%d")))
# link to the id so that the event can be easily deleted
tag['postId']=postId
postEvent.append(tag) postEvent.append(tag)
else: else:
# tag is a place # tag is a place
@ -88,8 +90,6 @@ def getTodaysEvents(baseDir: str,nickname: str,domain: str, \
calendarPostIds.append(postId) calendarPostIds.append(postId)
if not events.get(dayOfMonth): if not events.get(dayOfMonth):
events[dayOfMonth]=[] events[dayOfMonth]=[]
# link to the id so that the event can be easily deleted
postEvent['postId']=postId
events[dayOfMonth].append(postEvent) events[dayOfMonth].append(postEvent)
# if some posts have been deleted then regenerate the calendar file # if some posts have been deleted then regenerate the calendar file