Refactor Extension and Version: explicit constructors from File #191
No reviewers
Labels
No Label
Priority
Critical
Priority
High
Priority
Low
Priority
Normal
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Type
Breaking
Type
Documentation
Type
Enhancement
Type
Feature
Type
Report
Type
Security
Type
Suggestion
Type
Testing
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: infrastructure/extensions-website#191
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "refactor-models"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This change solves a blocker for an upcoming drop of Version.file field:
calculating
Extension.latest_version
relied on havingVersionFiles
alreadypopulated, but it was triggered on
Version.save()
, which happened beforethe cross table could be populated.
One functional change is that a Version object is now created in
NewVersionView, immediately after the File is saved, and not in
NewVersionFinalizeView, as before.
Tests are rewritten to require only FileFactory, the Extension and Version
objects are created as it is done in the actual production code.
This loses a bit on the ergonomics of factories, but overall makes the state of
test objects more consistent, often simplifying the test code.
VersionFactory is no longer needed, and has been cleaned up.
ExtensionFactory is only used in construct_fake_notifications, and could also
be replaced with an in-memory object constructed manually.
af9de1b851
toc90aa6d93c
c90aa6d93c
to6d8fd61b23
WIP: Refactor Extension and Version: explicit constructors from Fileto Refactor Extension and Version: explicit constructors from FileLGTM