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
Saves metadata from bag-info.txt to application #133
Conversation
project_electron/orgs/models.py
Outdated
bagit_profile_identifier = models.URLField() | ||
|
||
@classmethod | ||
def save_metadata(cls, metadata, archive=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This would be more useful as a method of Archives just like get_bag_data should be a save_bag_data, that way you don't need to expose another object, and prevents class method.
- also, foreign key shouldn't be blank or null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-And if logic needs to be in try/catch then return bool so code can react to it.
…d makes BagInfoMetadata.archives non-nullable
This is ready for another look! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@helrond I'll send you dump of the database that you'd be able to apply migrations too successfully (ideally what will happen when we go live)
Also, I made this a part of the ERROR Routine so you'll have to add BIERR to the ecodes..
@dboutmybizness your changes look good to me. As I was testing, I discovered a host of problems that occur when the bag metadata is saved before validation is complete, so I have moved that function down in the |
@helrond are you working on changes here? |
@dboutmybizness I am done with my work on this PR, unless you see issues that need to be addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good to go, I updated migrations, couple small tweaks, and NOTE: BIERR prior to launch live.
Adds models for metadata in
bag-info.txt
, as per #125. Started to add this data into views, but leaving most of that work for other PRs.This is branched from #132, so that should be merged first.