Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ohmg/api/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class MapListSchema2(Schema):
region_ct: int
prepared_ct: int
layer_ct: int
main_layer_ct: int
skip_ct: int
nonmap_ct: int
completion_pct: int
Expand Down
1 change: 1 addition & 0 deletions ohmg/core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class MapAdmin(admin.ModelAdmin):
"region_ct",
"prepared_ct",
"layer_ct",
"main_layer_ct",
"skip_ct",
"nonmap_ct",
"completion_pct",
Expand Down
18 changes: 18 additions & 0 deletions ohmg/core/migrations/0011_map_main_layer_ct.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.27 on 2026-04-24 19:07

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('core', '0010_remove_layerset_multimask'),
]

operations = [
migrations.AddField(
model_name='map',
name='main_layer_ct',
field=models.IntegerField(default=0),
),
]
5 changes: 5 additions & 0 deletions ohmg/core/models/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ class Meta:
layer_ct = models.IntegerField(
default=0,
)
main_layer_ct = models.IntegerField(
default=0,
)
skip_ct = models.IntegerField(
default=0,
)
Expand Down Expand Up @@ -404,6 +407,7 @@ def update_item_lookup(self):
self.region_ct = region_ct
self.prepared_ct = prepared_ct
self.layer_ct = layer_ct
self.main_layer_ct = main_lyrs_ct
self.skip_ct = skip_ct
self.nonmap_ct = nonmap_ct
self.completion_pct = completion_pct
Expand All @@ -418,6 +422,7 @@ def update_item_lookup(self):
"region_ct",
"prepared_ct",
"layer_ct",
"main_layer_ct",
"skip_ct",
"nonmap_ct",
"completion_pct",
Expand Down
1 change: 1 addition & 0 deletions ohmg/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ def post(self, request):
logger.debug(f"removing mask from layer {layer.slug} ({layer.pk})")
layer.mask = None
layer.save(set_extent=False, skip_map_lookup_update=True)
layerset.map.update_item_lookup()
return JsonResponseSuccess()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
<td class="number-col">{s.skip_ct}</td>
<td class="number-col">{s.nonmap_ct}</td>
<td class="number-col new-col"><div class="box" style="--p:{s.completion_pct};"></div></td>
<td class="number-col new-col">{s.multimask_ct}/{s.layer_ct}</td>
<td class="number-col new-col">{s.multimask_ct}/{s.main_layer_ct}</td>
<td class="number-col new-col"
>{#if s.gt_exists}
<span style="color:green">✓</span>
Expand Down