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

Feat/2317 escape function during import #14

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

taylorn01
Copy link

@taylorn01 taylorn01 commented Aug 16, 2024

Description

Passes a new parameter down to the context of the resource instance and tiles. This can then be accessed when a function is fired and used to conditionality decide if the function should escape because it is set to true.

…tions allowing them to conditionality escape
@philtweir
Copy link

Is context something that django will normally expect, such that nothing will break if it is used with an Arches project that hasn't been updated since this change?

@taylorn01
Copy link
Author

taylorn01 commented Aug 16, 2024

From what I can tell it's something the arches guys have implemented as a means to transfer context between functions. During my tests I never seen it actually log with any values so it must only be used in rare cases like this

Archesfile resource save location:

model/resource.py context object accessed from kwargs:

context = kwargs.pop("context", None)

model/resource.py passing context object to the tile save:

tile.save(request=request, index=False, resource_creation=True, transaction_id=transaction_id, context=context)

tile save passing the context to the post save functions:

self.__postSave(request, context=context)

@OwenGalvia OwenGalvia self-assigned this Aug 22, 2024
@taylorn01 taylorn01 assigned taylorn01 and unassigned OwenGalvia Aug 22, 2024
Copy link
Author

@taylorn01 taylorn01 left a comment

Choose a reason for hiding this comment

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

lgtm

@taylorn01 taylorn01 merged commit 9f923f5 into coral-7.6 Aug 22, 2024
4 of 10 checks passed
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