Skip to content

fallback to ASO if traits are blank#1145

Merged
kbiala merged 3 commits intomasterfrom
sc-177838-fix-traits-organization-for-20326-gb-city-of
Mar 30, 2026
Merged

fallback to ASO if traits are blank#1145
kbiala merged 3 commits intomasterfrom
sc-177838-fix-traits-organization-for-20326-gb-city-of

Conversation

@maciejkocylapc
Copy link
Copy Markdown
Collaborator

What's this PR do?

  • replace old values if maxmind updates isp and oragnization data only partially.

How should this be manually tested?

  • run tests

Task completed checklist:

  • [] Is there appropriate test coverage?
  • [] Did I take into consideration possible security vulnerabilities?
  • [] Are the controllers secure?
  • [] Was every important matter documented?

Things to watch out for

  • [N] Does this PR have any migrations?
  • [N] Does this PR add new dependencies?

data_center.postal_confidence = max_mind_info.postal.confidence unless max_mind_info.postal.confidence.blank?
data_center.traits_isp = max_mind_info.traits.isp unless max_mind_info.traits.isp.blank?
data_center.traits_organization = max_mind_info.traits.organization unless max_mind_info.traits.organization.blank?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/AbcSize: Assignment Branch Condition size for fill_blank_values is too high. [<35, 167, 30> 173.2/60]

data_center.postal_confidence = max_mind_info.postal.confidence unless max_mind_info.postal.confidence.blank?
data_center.traits_isp = max_mind_info.traits.isp unless max_mind_info.traits.isp.blank?
data_center.traits_organization = max_mind_info.traits.organization unless max_mind_info.traits.organization.blank?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/CyclomaticComplexity: Cyclomatic complexity for fill_blank_values is too high. [31/18]

@kbiala kbiala merged commit 98be680 into master Mar 30, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants