diff --git a/rog/models.py b/rog/models.py index 793f690..36b7495 100644 --- a/rog/models.py +++ b/rog/models.py @@ -327,7 +327,7 @@ def remove_bom_inplace(path): buffer_size = 4096 bom_length = len(codecs.BOM_UTF8) - with open(path, mode="r+b", encoding="utf-8") as fp: + with open(path, mode="r+b") as fp: chunk = fp.read(buffer_size) if chunk.startswith(codecs.BOM_UTF8): i = 0 @@ -382,7 +382,7 @@ def publish_date(sender, instance, created, **kwargs): try: csv_f = glob.glob(r'{}/**/*.csv'.format(file_path), recursive=True)[0] - #remove_bom_inplace(csv_f) + remove_bom_inplace(csv_f) mdl = apps.get_model(app_label="rog", model_name=LAYER_CHOICES[instance.layerof -1][1]) print(mdl)