Skip to content

Conversation

@pollardld
Copy link
Member

@pollardld pollardld commented May 16, 2025

This pull request makes updates to the TEKDB codebase to fix naming inconsistencies and align with the correct model and field names. The changes primarily involve renaming placeresources to placesresources and updating related references in the code.

Updates to naming and model references:

  • In TEKDB/TEKDB/admin.py:

    • Renamed placeresources to placesresources in the save_model method and updated the associated model from PlaceResourceMediaEvents to PlacesResourceMediaEvents. [1] [2]
    • Updated the fieldsets definition to use placesresources instead of placeresources.
  • In TEKDB/TEKDB/forms.py:

    • Updated the import statement to replace PlacesResourceMediaEvents with PlacesResourceEvents.
    • Renamed the placeresources field to placesresources in the MediaBulkUploadForm class and updated its queryset and widget label accordingly.

@pollardld pollardld added this to the v2.2 milestone May 16, 2025
@pollardld pollardld requested a review from Copilot May 16, 2025 17:25
@pollardld pollardld self-assigned this May 16, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes naming inconsistencies for media event models and field names during bulk media uploads. Key changes include updating the model import in forms from PlacesResourceMediaEvents to PlacesResourceEvents, renaming the field from placeresources to placesresources in the MediaBulkUploadForm, and aligning the admin save_model method by renaming variables and fieldset entries.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
TEKDB/TEKDB/forms.py Updated import and field name to reflect the intended naming fix
TEKDB/TEKDB/admin.py Renamed references and updated fieldsets for consistency
Comments suppressed due to low confidence (2)

TEKDB/TEKDB/forms.py:3

  • The model import was updated to 'PlacesResourceEvents', which differs from the intended renaming described in the PR (to 'PlacesResourceMediaEvents'). Please verify that this change is intentional and consistent with the rest of the codebase.
from .models import MediaBulkUpload, Media, Places, Resources, Citations, ResourcesActivityEvents, PlacesResourceEvents

TEKDB/TEKDB/admin.py:497

  • [nitpick] The loop variable 'placeresource' remains singular while iterating a collection named 'placesresources'. Consider renaming it to 'placesresource' for clarity and consistency.
for placeresource in placesresources:

@pollardld pollardld merged commit bff04c5 into main May 16, 2025
1 check passed
@pollardld pollardld deleted the fix2.2.1 branch May 16, 2025 17:40
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.

2 participants