Skip to content

Commit

Permalink
Remove glide number from gidd apis and exports.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rup-Narayan-Rajbanshi committed May 31, 2024
1 parent a54e564 commit c23e4fd
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 14 deletions.
7 changes: 0 additions & 7 deletions apps/gidd/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ class Meta:
'hazard_sub_category_name',
'hazard_type_name',
'hazard_sub_type_name',
'glide_numbers',
'event_codes',
'event_codes_type',
)
Expand Down Expand Up @@ -332,10 +331,6 @@ class GiddEventType(graphene.ObjectType):
new_displacement_rounded = graphene.Int()
start_date = graphene.Date(required=True)
end_date = graphene.Date(required=True)
glide_numbers = graphene.List(
graphene.NonNull(graphene.String),
required=True,
)
event_codes = graphene.List(
graphene.NonNull(graphene.String),
required=True,
Expand Down Expand Up @@ -735,7 +730,6 @@ def resolve_gidd_public_event(parent, info, **kwargs):
# so first objects is taken directly from queryset instead of iterating
event_data = disaster_qs.values(
'event_name',
'glide_numbers',
'start_date',
'end_date',
'event_codes',
Expand All @@ -762,7 +756,6 @@ def resolve_gidd_public_event(parent, info, **kwargs):
new_displacement=event_data.get('total_new_displacement'),
start_date=event_data.get('start_date'),
end_date=event_data.get('end_date'),
glide_numbers=event_data.get('glide_numbers'),
event_codes=event_data.get('event_codes'),
event_codes_type=event_data.get('event_codes_type'),
affected_countries=[
Expand Down
1 change: 0 additions & 1 deletion apps/gidd/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class Meta:
'hazard_type_name',
'hazard_sub_type',
'hazard_sub_type_name',
'glide_numbers',
'event_codes',
'event_codes_type',
)
Expand Down
2 changes: 0 additions & 2 deletions apps/gidd/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ def update_conflict_and_disaster_data():
'event__end_date',
'event__start_date_accuracy',
'event__end_date_accuracy',
'event__glide_numbers',
'country',
'country__iso3',
'country__idmc_short_name',
Expand Down Expand Up @@ -301,7 +300,6 @@ def update_conflict_and_disaster_data():
hazard_sub_category_name=item['event__disaster_sub_category__name'],
hazard_type_name=item['event__disaster_type__name'],
hazard_sub_type_name=item['event__disaster_sub_type__name'],
glide_numbers=item['event__glide_numbers'] or list(),

new_displacement=item['new_displacement'],
total_displacement=item['total_displacement'],
Expand Down
2 changes: 0 additions & 2 deletions apps/gidd/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ def export(self, request):
disaster.event_codes,
disaster.event_codes_type
)]
) or EXTERNAL_ARRAY_SEPARATOR.join(
[f"{key}{EXTERNAL_FIELD_SEPARATOR}Glide Number" for key in disaster.glide_numbers]
),
disaster.event_id,
self.get_displacement_status(disaster.displacement_occurred),
Expand Down
2 changes: 0 additions & 2 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2370,7 +2370,6 @@ type GiddDisasterType {
hazardSubCategoryName: String!
hazardSubTypeName: String!
hazardTypeName: String!
glideNumbers: [String!]!
eventCodes: [String!]!
eventCodesType: [String!]!
countryId: ID!
Expand Down Expand Up @@ -2416,7 +2415,6 @@ type GiddEventType {
newDisplacementRounded: Int
startDate: Date!
endDate: Date!
glideNumbers: [String!]!
eventCodes: [String!]!
eventCodesType: [String!]!
affectedCountries: [GiddEventAffectedCountryType]
Expand Down

0 comments on commit c23e4fd

Please sign in to comment.