File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ async def web_modules_file(request: HttpRequest, file: str) -> HttpResponse:
24
24
# Fetch the file from cache, if available
25
25
last_modified_time = os .stat (path ).st_mtime
26
26
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 ))
28
28
if response is None :
29
29
async with async_open (path , "r" ) as fp :
30
30
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 )
34
34
)
35
35
return response
36
36
You can’t perform that action at this time.
0 commit comments