Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script to link exisiting orgs with domains and make domain view safe #3286

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

SahilDhillon21
Copy link
Contributor

Fixes #3279

  1. Added a management command to link Domain instances to Organization entities.
  2. Replaced get_or_404 with error handling that allows page rendering even if trademarks fail to load.
  3. Modified the get_name property on Domain model to ensure the URL has a scheme and safely extract the domain name

Copy link

sentry-io bot commented Jan 27, 2025

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: website/views/organization.py

Function Unhandled Issue
get_context_data FieldError: Cannot resolve keyword 'top_tester' into field. Choices are: clicks, closed_issues_count, color, ... ...
Event Count: 3

Did you find this useful? React with a 👍 or 👎

@tsu-ki
Copy link
Contributor

tsu-ki commented Jan 27, 2025

@SahilDhillon21 does this script handle cases where domains are different from organisation's name?
while creating gsoc organisation json file, I noticed that many orgs have domains dissimilar to their names. If this isn't taken into consideration, it might cause errors

@SahilDhillon21
Copy link
Contributor Author

@SahilDhillon21 does this script handle cases where domains are different from organisation's name? while creating gsoc organisation json file, I noticed that many orgs have domains dissimilar to their names. If this isn't taken into consideration, it might cause errors

Hopefully their domain name at least contains the org name, if not then we'll have to add more methods to link them
Can you please send me the json so that I can test this script and possibly improve it to handle different cases

@tsu-ki
Copy link
Contributor

tsu-ki commented Jan 27, 2025

@SahilDhillon21 does this script handle cases where domains are different from organisation's name? while creating gsoc organisation json file, I noticed that many orgs have domains dissimilar to their names. If this isn't taken into consideration, it might cause errors

Hopefully their domain name at least contains the org name, if not then we'll have to add more methods to link them Can you please send me the json so that I can test this script and possibly improve it to handle different cases

sure thing, if you're able to implement linking gsoc org's domain to their blt profile page, please do let me know as I'm having trouble with that right now. I've shared the file with you on slack

@DonnieBLT DonnieBLT enabled auto-merge (squash) January 29, 2025 15:17
@DonnieBLT DonnieBLT merged commit 23f0c52 into OWASP-BLT:main Jan 29, 2025
9 checks passed
@tsu-ki
Copy link
Contributor

tsu-ki commented Jan 29, 2025

@SahilDhillon21 were you able to create functions to resolve the inconsistency we discussed earlier?

@SahilDhillon21
Copy link
Contributor Author

@SahilDhillon21 were you able to create functions to resolve the inconsistency we discussed earlier?

I tried some libraries like fuzzywuzzy to match orgs and domains based on similarity but the results weren't satisfactory
I think the best thing to do would be to create a migration file or command that manually adds the organisation and associates the domain with it

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.

Domain page is not showing any information
3 participants