Skip to content

Commit

Permalink
Remove unneeded merge migration (pulled files-on-anything just added)…
Browse files Browse the repository at this point in the history
…. Shift migrations to depend on latest added (0117_set_is_root).

- See if is_quickfiles exists in update_file method (preprints don't have this attribute).
  • Loading branch information
pattisdr committed Jul 16, 2018
1 parent 1fce58c commit d84be3c
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 22 deletions.
16 changes: 0 additions & 16 deletions osf/migrations/0116_merge_20180702_1607.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class Migration(migrations.Migration):

dependencies = [
('osf', '0116_merge_20180702_1607'),
('osf', '0117_set_is_root'),
]

operations = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class Migration(migrations.Migration):

dependencies = [
('osf', '0117_update_preprint_model_for_divorce'),
('osf', '0118_update_preprint_model_for_divorce'),
]

operations = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def divorce_preprints_from_nodes_sql(state, schema):
class Migration(migrations.Migration):

dependencies = [
('osf', '0118_add_preprint_partial_index'),
('osf', '0119_add_preprint_partial_index'),
]

operations = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def migrate_preprint_service_permissions(state, schema):
class Migration(migrations.Migration):

dependencies = [
('osf', '0119_preprint_node_divorce'),
('osf', '0120_preprint_node_divorce'),
]

operations = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class Migration(migrations.Migration):

dependencies = [
('osf', '0120_transfer_preprint_service_permissions'),
('osf', '0121_transfer_preprint_service_permissions'),
]

operations = [
Expand Down
2 changes: 1 addition & 1 deletion website/search/elastic_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ def update_file(file_, index=None, delete=False):
provider=file_.provider,
path=file_.path,
)
if target.is_quickfiles:
if getattr(target, 'is_quickfiles', None):
node_url = '/{user_id}/quickfiles/'.format(user_id=target.creator._id)
else:
node_url = '/{target_id}/'.format(target_id=target._id)
Expand Down

0 comments on commit d84be3c

Please sign in to comment.