fix logic error in CachePackage.open()

This commit is contained in:
Gwendolyn 2023-12-07 17:43:32 +01:00
parent f2f048d094
commit 6e12553c5f

View file

@ -107,8 +107,8 @@ class CachePackage:
return cls(bounds, levels)
@classmethod
def open(cls, filename=None):
if filename is None:
def open(cls, package=None):
if package is None:
from django.conf import settings
package = settings.CACHE_ROOT / 'package.tar'
return cls.read(package.open('rb'))