Skip to content

Commit

Permalink
alert variable can never be nil, remove logic from if statement in ma…
Browse files Browse the repository at this point in the history
…pper
  • Loading branch information
nshumoogum committed Feb 4, 2020
1 parent 747fab0 commit 6aa4cde
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 ONS Digital
Copyright (c) 2018-2020 ONS Digital

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ and update the `MAIL_*` and `FEEDBACK_*` variables configured for this app.

### Licence

Copyright ©‎ 2017, Office for National Statistics (https://www.ons.gov.uk)
Copyright ©‎ 2017 2020, Office for National Statistics (https://www.ons.gov.uk)

Released under MIT license, see [LICENSE](LICENSE.md) for details.
2 changes: 1 addition & 1 deletion mapper/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func CreateVersionsList(ctx context.Context, d dataset.DatasetDetails, edition d
const correctionAlertType = "correction"
if ver.Alerts != nil {
for _, alert := range *ver.Alerts {
if &alert != nil && alert.Type == correctionAlertType {
if alert.Type == correctionAlertType {
version.Corrections = append(version.Corrections, datasetVersionsList.Correction{
Reason: alert.Description,
Date: alert.Date,
Expand Down

0 comments on commit 6aa4cde

Please sign in to comment.