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

DEV: Stop using FoundUserWithStatusSerializer #546

Merged

Conversation

AndrewPrigorshnev
Copy link
Contributor

@AndrewPrigorshnev AndrewPrigorshnev commented Feb 7, 2024

Starting from discourse/discourse@b3a1199 we stop using deprecated "WithStatus" serializers. Instead we'll be passing an 'include_status' option to serilaizers, for example:

# before
BasicUserWithStatusSerializer.new(user)
ArraySerializer.new(users, each_serializer: BasicUserWithStatusSerializer)

# now
BasicUserSerializer.new(user, include_status: true)
ArraySerializer.new(users, each_serializer: BasicUserSerializer, include_status: true)

@AndrewPrigorshnev AndrewPrigorshnev changed the title Stop using FoundUserWithStatusSerializer DEV: Stop using FoundUserWithStatusSerializer Feb 7, 2024
@AndrewPrigorshnev AndrewPrigorshnev force-pushed the dev/stop-using-found-user-with-status-serializer branch from fb1e816 to 5618827 Compare February 7, 2024 19:50
@jjaffeux
Copy link
Contributor

We probably need a discourse compatibility entry too no?

@AndrewPrigorshnev
Copy link
Contributor Author

We probably need a discourse compatibility entry too no?

Yeah, that's right. I was going to add it after we merge the Core PR.

@AndrewPrigorshnev AndrewPrigorshnev force-pushed the dev/stop-using-found-user-with-status-serializer branch from 7d997ec to 9210969 Compare March 14, 2024 13:22
@AndrewPrigorshnev AndrewPrigorshnev merged commit a1686e1 into main Mar 14, 2024
5 checks passed
@AndrewPrigorshnev AndrewPrigorshnev deleted the dev/stop-using-found-user-with-status-serializer branch March 14, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants