On n'utilise pas la position exacte comme marqueur de différence
This commit is contained in:
parent
39aa4a8d3c
commit
8e4995558f
@ -822,7 +822,7 @@ class Event(models.Model):
|
|||||||
|
|
||||||
def get_comparison(events):
|
def get_comparison(events):
|
||||||
result = []
|
result = []
|
||||||
for attr in Event.data_fields(all=True, local_img=False):
|
for attr in Event.data_fields(all=True, local_img=False, exact_location=False):
|
||||||
values = [getattr(e, attr) for e in events]
|
values = [getattr(e, attr) for e in events]
|
||||||
values = ["" if v is None else v for v in values]
|
values = ["" if v is None else v for v in values]
|
||||||
|
|
||||||
@ -865,7 +865,7 @@ class Event(models.Model):
|
|||||||
elist = list(events) + ([self] if self.pk is not None else [])
|
elist = list(events) + ([self] if self.pk is not None else [])
|
||||||
Event.objects.bulk_update(elist, fields=["possibly_duplicated"])
|
Event.objects.bulk_update(elist, fields=["possibly_duplicated"])
|
||||||
|
|
||||||
def data_fields(all=False, local_img=True):
|
def data_fields(all=False, local_img=True, exact_location=True):
|
||||||
if all:
|
if all:
|
||||||
result = ["category"]
|
result = ["category"]
|
||||||
else:
|
else:
|
||||||
@ -874,7 +874,6 @@ class Event(models.Model):
|
|||||||
result += [
|
result += [
|
||||||
"title",
|
"title",
|
||||||
"location",
|
"location",
|
||||||
"exact_location",
|
|
||||||
"start_day",
|
"start_day",
|
||||||
"start_time",
|
"start_time",
|
||||||
"end_day",
|
"end_day",
|
||||||
@ -884,6 +883,8 @@ class Event(models.Model):
|
|||||||
]
|
]
|
||||||
if all and local_img:
|
if all and local_img:
|
||||||
result += ["local_image"]
|
result += ["local_image"]
|
||||||
|
if all and exact_location:
|
||||||
|
result += ["exact_location"]
|
||||||
result += ["image_alt", "reference_urls", "recurrences"]
|
result += ["image_alt", "reference_urls", "recurrences"]
|
||||||
if all:
|
if all:
|
||||||
result += ["tags"]
|
result += ["tags"]
|
||||||
|
Loading…
Reference in New Issue
Block a user