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

AIC fixes #450

Merged
merged 6 commits into from
May 26, 2016
Merged

AIC fixes #450

merged 6 commits into from
May 26, 2016

Conversation

Hwesta
Copy link
Contributor

@Hwesta Hwesta commented May 26, 2016

Fixes for bugs relating to #440 and deleting empty directories.

  • Add DMDID to the top-level structMap div, instead of the objects directory, since it no longer exists
  • Deleting bagged files continues processing if it has an error, which happens for AICs since there's no objects directory
  • Add the metadata directory explicitly to the structMap when it's not in the objects dir
  • Delete empty directories anywhere in the AIP, not just the objects directory.

And other minor fixes

  • Only try to decode str not unicode strings. Fixes displaying unicode in the task detail view
  • Set default project settings, instead of the boilerplate

@Hwesta Hwesta modified the milestone: 1.5.0 May 26, 2016
@@ -144,7 +144,7 @@ def escapeForCommand(string):
# and is primarily used for arbitrary strings (e.g. filenames, paths)
# that might not be valid unicode to begin with.
def escape(string):
if isinstance(string, basestring):
if isinstance(string, str):
Copy link
Member

Choose a reason for hiding this comment

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

Should we use django.utils.six.binary_type instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Neat, I didn't realize Django shipped with a copy of six! We've tried to keep from requiring Django in archivematicaCommon however, and when we do the Py3 conversion we'll probably just use six as a dependency instead of using Django's.

@sevein
Copy link
Member

sevein commented May 26, 2016

👍

Hwesta added 6 commits May 26, 2016 15:55
Unicode strings cannot be decoded, so only try to run .decode on bytestrings.
An AIC does not have an objects directory, so put the DMDID on the SIP
directory div instead.
Revert change to metadata dir from b7ebee6
In an AIC, the metadata dir is not inside the objects dir, and is added to
the fileSec separately.
Remove empty directories anywhere in the AIP, not just in the objects
directory.
@qubot qubot force-pushed the dev/issue-9882-aic branch from 3ab5134 to 1b64557 Compare May 26, 2016 22:56
@qubot qubot merged commit 1b64557 into qa/1.5.x May 26, 2016
@qubot qubot deleted the dev/issue-9882-aic branch May 26, 2016 23:05
@Hwesta Hwesta mentioned this pull request Jun 10, 2016
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.

3 participants