Skip to content

Commit

Permalink
Remove obsolete completness view and code (#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
danjov authored Dec 11, 2023
2 parents 5bbd263 + 8b0c7b0 commit 3dc28f9
Show file tree
Hide file tree
Showing 10 changed files with 2,493 additions and 42 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Use numeric input instead of dropdown for top bedrock quality fields.
- Proxy requests to legacy api through .NET API with authentication.
- Disable spatial reference inputs when editing mode is not active or borehole status does not allow editing.
- Remove obsolete database view `completness`.

## v2.0.476 - 2023-12-08

Expand Down
3 changes: 0 additions & 3 deletions src/api-legacy/v1/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ def getordering(self, orderby, direction):
elif orderby == 'status':
_orderby = 'status_id_cli'

elif orderby == 'completness':
_orderby = 'percentage'

elif orderby == 'creator':
_orderby = 'created_by_bho'

Expand Down
11 changes: 0 additions & 11 deletions src/api-legacy/v1/borehole/editinglist.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ async def execute(
) t
) as extended,
stratigraphy as stratigraphy,
completness.percentage,
array_to_json(status) as workflows,
status[array_length(status, 1)] ->> 'role' as "role"
Expand Down Expand Up @@ -177,11 +176,6 @@ async def execute(
ON
v.id_bho_fk = borehole.id_bho
INNER JOIN
bdms.completness
ON
completness.id_bho = borehole.id_bho
LEFT JOIN
bdms.users as locker
ON
Expand Down Expand Up @@ -284,11 +278,6 @@ async def execute(
ON
ids.id_bho_fk = id_bho
INNER JOIN
bdms.completness
ON
completness.id_bho = borehole.id_bho
INNER JOIN
bdms.users as creator
ON
Expand Down
4 changes: 0 additions & 4 deletions src/api-legacy/v1/borehole/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ def get_sql(sql_lock='', file_permission=''):
) t
) as custom,
stratigraphy as stratigraphy,
completness.percentage,
(
SELECT row_to_json(t)
FROM (
Expand Down Expand Up @@ -246,9 +245,6 @@ def get_sql(sql_lock='', file_permission=''):
ON
p.id_bho_fk = id_bho
INNER JOIN bdms.completness
ON completness.id_bho = borehole.id_bho
INNER JOIN bdms.users as updater
ON updated_by_bho = updater.id_usr
Expand Down
5 changes: 0 additions & 5 deletions src/api-legacy/v1/borehole/ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ async def execute(self, filter={}, user=None):
bdms.users as creator
ON
created_by_bho = creator.id_usr
INNER JOIN
bdms.completness
ON
completness.id_bho = borehole.id_bho
"""

if len(where) > 0:
Expand Down
2 changes: 0 additions & 2 deletions src/api-legacy/v1/borehole/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,6 @@ async def execute(self, id, field, value, user):
bdms.borehole
INNER JOIN bdms.users as locker
ON locked_by_bho = locker.id_usr
INNER JOIN bdms.completness
ON completness.id_bho = borehole.id_bho
INNER JOIN bdms.users as updater
ON updated_by_bho = updater.id_usr
WHERE
Expand Down
Loading

0 comments on commit 3dc28f9

Please sign in to comment.