Skip to content

Commit aa1ae44

Browse files
authored
django-stubs 1.13.0 compatibility (#111)
1 parent 8938465 commit aa1ae44

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/django_idom/http/views.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ async def web_modules_file(request: HttpRequest, file: str) -> HttpResponse:
2424
# Fetch the file from cache, if available
2525
last_modified_time = os.stat(path).st_mtime
2626
cache_key = f"django_idom:web_module:{str(path).lstrip(str(web_modules_dir))}"
27-
response = await IDOM_CACHE.aget(cache_key, version=last_modified_time) # type: ignore[attr-defined]
27+
response = await IDOM_CACHE.aget(cache_key, version=int(last_modified_time))
2828
if response is None:
2929
async with async_open(path, "r") as fp:
3030
response = HttpResponse(await fp.read(), content_type="text/javascript")
31-
await IDOM_CACHE.adelete(cache_key) # type: ignore[attr-defined]
32-
await IDOM_CACHE.aset( # type: ignore[attr-defined]
33-
cache_key, response, timeout=None, version=last_modified_time
31+
await IDOM_CACHE.adelete(cache_key)
32+
await IDOM_CACHE.aset(
33+
cache_key, response, timeout=None, version=int(last_modified_time)
3434
)
3535
return response
3636

0 commit comments

Comments
 (0)