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

Deduplicate routes #201

Merged
merged 9 commits into from
Feb 5, 2025
Merged

Deduplicate routes #201

merged 9 commits into from
Feb 5, 2025

Conversation

jacobtylerwalls
Copy link
Member

Add generic serializers that allow for route deduplication.

Closes #198

arches_lingo/views/api/generic.py Outdated Show resolved Hide resolved
fields = "__all__"

def validate(self, data):
data = super().validate(data)
def validate_appellative_status(self, data):
Copy link
Member Author

Choose a reason for hiding this comment

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

The next thing we're going to want is a similar hook in the resource serializer to ensure that if you're using that, you can run this logic too. I'm still thinking that part through, but at least there's no functionality regression with this because Johnathan's work on labels uses the tile serializer.

Copy link
Collaborator

@aarongundel aarongundel left a comment

Choose a reason for hiding this comment

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

This looks great to me. I'm going to rebase my generic forms work on top of it - might have more feedback that falls out of using that.

} else {
await updateSchemeNote(
route.params.id as string,
const updated = await upsertLingoTile(
Copy link
Collaborator

Choose a reason for hiding this comment

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

love that this is an upsert.

@@ -1,12 +1,7 @@
import arches from "arches";
import Cookies from "js-cookie";
import type {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Amazing how much was dropped here. Fantastic.

@chrabyrd
Copy link
Contributor

chrabyrd commented Feb 5, 2025

🥹 Looks great. There's some minor stuff to hash out but it doesn't need to be here

@jacobtylerwalls jacobtylerwalls merged commit f7e09f1 into main Feb 5, 2025
5 of 6 checks passed
@jacobtylerwalls jacobtylerwalls deleted the jtw/deduplicate-routes branch February 5, 2025 14:11
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.

Deduplicate routes
3 participants