Skip to content

Commit

Permalink
Fix small things
Browse files Browse the repository at this point in the history
  • Loading branch information
haneslinger committed Nov 26, 2024
1 parent 65dba57 commit 737d4dc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ angular.module('SEED.controller.inventory_group_detail_meters', [])
controller: 'meter_deletion_modal_controller',
resolve: {
organization_id: () => $scope.organization.id,
group_id: () => meter.service_group,
group_id: () => meter.config.group_id,
meter: () => meter,
view_id: () => view_id,
refresh_meters_and_readings: () => $scope.refresh_meters_and_readings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ angular.module('SEED.controller.meter_deletion_modal', []).controller('meter_del

$scope.delete_meter = () => {
spinner_utility.show();
meter_service.delete_meter(organization_id, meter.id, view_id, group_id).then(() => {
let delete_promise;
if (view_id) {
delete_promise = meter_service.delete_property_meter(organization_id, meter.id, view_id)
} else{
delete_promise = meter_service.delete_group_meter(organization_id, meter.id, group_id)
}
delete_promise.then(() => {
refresh_meters_and_readings();
spinner_utility.show();
$uibModalInstance.dismiss('cancel');
Expand Down
2 changes: 1 addition & 1 deletion seed/views/v3/inventory_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def create(self, request, inventory_group_pk):
meter_serializer = MeterSerializer(
data={
**request.data,
"connection_type": "From Outside",
"connection_type": "Imported",
"source": "Manual Entry",
}
)
Expand Down

0 comments on commit 737d4dc

Please sign in to comment.