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

Remove license_url computation #703

Open
obulat opened this issue May 20, 2022 · 0 comments · May be fixed by #4198
Open

Remove license_url computation #703

obulat opened this issue May 20, 2022 · 0 comments · May be fixed by #4198
Assignees
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: api Related to the Django API ⛔ status: blocked Blocked & therefore, not ready for work
Projects

Comments

@obulat
Copy link
Contributor

obulat commented May 20, 2022

Problem

We are currently using code to compute license_url for some images that do not have it in the database. This code should become unnecessary when we normalize data in the database.

def license_url(self) -> str:
"""A direct link to the license deed or legal terms."""
if self.meta_data and (url := self.meta_data.get("license_url")):
return url
else:
return get_license_url(self.license.lower(), self.license_version)

This issue is blocked by #3885.

Description

We should remove the code that computes the license_url as it should be available in the meta_data.license_url field for all media items in the database.

@obulat obulat added 🟨 priority: medium Not blocking but should be addressed soon ✨ goal: improvement Improvement to an existing user-facing feature 💻 aspect: code Concerns the software code in the repository ⛔ status: blocked Blocked & therefore, not ready for work data normalization labels May 20, 2022
@obulat obulat mentioned this issue May 20, 2022
29 tasks
@obulat obulat changed the title Remove license_url computation Remove license_url computation May 20, 2022
@obulat obulat transferred this issue from WordPress/openverse-api Feb 22, 2023
@obulat obulat added 🧱 stack: api Related to the Django API and removed 🧱 stack: backend labels Mar 20, 2023
@krysal krysal removed the ⛔ status: blocked Blocked & therefore, not ready for work label Aug 10, 2023
@dhruvkb dhruvkb added this to the Data normalization milestone Dec 2, 2023
@krysal krysal added the ⛔ status: blocked Blocked & therefore, not ready for work label Mar 7, 2024
@krysal krysal linked a pull request Apr 24, 2024 that will close this issue
8 tasks
@krysal krysal self-assigned this Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: api Related to the Django API ⛔ status: blocked Blocked & therefore, not ready for work
Projects
Status: 🏗 In Progress
Openverse
  
Backlog
Development

Successfully merging a pull request may close this issue.

3 participants