1
0
Fork 0

Forget to update calendar file name

This commit is contained in:
Ethanell 2019-12-25 18:00:59 +01:00
parent 5d49fec02a
commit 532b153e46
2 changed files with 2 additions and 2 deletions

View file

@ -35,7 +35,7 @@ class Calendar(ics.Calendar):
return f"{url}?resources={resources}&projectId={projectid}&calType=ical&firstDate={firstdate}&lastDate={lastdate}" return f"{url}?resources={resources}&projectId={projectid}&calType=ical&firstDate={firstdate}&lastDate={lastdate}"
def _get_calendar(self, url: str, resources: int, projectid: int): def _get_calendar(self, url: str, resources: int, projectid: int):
name = f"calendars/{url[1]}-{url[2]}.ical" name = f"calendars/{resources}-{projectid}.ical"
now = self._now().timestamp() now = self._now().timestamp()
if not isfile(name) or now-getmtime(name) < now-360: if not isfile(name) or now-getmtime(name) < now-360:
open(name, "w").write(requests.get(self._url(url, resources, projectid)).text) open(name, "w").write(requests.get(self._url(url, resources, projectid)).text)

View file

@ -1,5 +1,5 @@
import shelve import shelve
from EDTuser import User from base import User
with shelve.open("edt", writeback=True) as db: with shelve.open("edt", writeback=True) as db:
for u in db: for u in db: