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

fix: adding internal class (e.g. _User) fails due to prefixed underscore #2036

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

KodeDave
Copy link
Contributor

@KodeDave KodeDave commented Feb 10, 2022

New Pull Request Checklist

Issue Description

SpecialClasses from /lib/Constants.js already have the '_' prefix, so adding it will send a double underscore to the Parse server (e.g.: '__Installation' instead of '_installation'), which resolves in an Invalid classname error, based on the SchemaController's function 'validateNewClass'

Related issue: #2035

Approach

TODOs before merging

  • Add tests
  • Add changes to documentation (guides, repository pages, in-code descriptions)
  • A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)

SpecialClasses from /lib/Constants.js already have the '_' prefix, so adding it will send a double underscore to the Parse server (e.g.: '__Installation' instead of '_installation'), which resolves in an Invalid classname error, based on the SchemaController's function 'validateNewClass'
@parse-github-assistant
Copy link

parse-github-assistant bot commented Feb 10, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@mtrezza mtrezza changed the title fix: avoid error on SpecialClasses creation fix: adding internal class (e.g. _User) fails due to prefixed underscore Feb 10, 2022
@mtrezza mtrezza requested a review from a team February 10, 2022 11:00
@mtrezza
Copy link
Member

mtrezza commented Feb 10, 2022

@KodeDave Kindly let me know when this is ready for review.

@KodeDave
Copy link
Contributor Author

@KodeDave Kindly let me know when this is ready for review.

@mtrezza AFAICS, checking tests, documentation and the PR you shared #1878, that introduced the bug, no other action's required: I'd say it's ready for review so. Am i missing something?

Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for the fix!

@mtrezza mtrezza removed the request for review from a team February 10, 2022 12:10
@mtrezza mtrezza merged commit f80bd07 into parse-community:alpha Feb 10, 2022
@mtrezza mtrezza linked an issue Feb 10, 2022 that may be closed by this pull request
4 tasks
parseplatformorg pushed a commit that referenced this pull request Feb 10, 2022
# [4.0.0-alpha.16](4.0.0-alpha.15...4.0.0-alpha.16) (2022-02-10)

### Bug Fixes

* adding internal class (e.g. `_User`) fails due to prefixed underscore ([#2036](#2036)) ([f80bd07](f80bd07))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.0.0-alpha.16

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Feb 10, 2022
parseplatformorg pushed a commit that referenced this pull request Mar 4, 2022
# [4.0.0-beta.4](4.0.0-beta.3...4.0.0-beta.4) (2022-03-04)

### Bug Fixes

* adding internal class (e.g. `_User`) fails due to prefixed underscore ([#2036](#2036)) ([f80bd07](f80bd07))
* security upgrade prismjs from 1.26.0 to 1.27.0 ([#2047](#2047)) ([3afb24e](3afb24e))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.0.0-beta.4

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Mar 4, 2022
mtrezza pushed a commit to mtrezza/parse-dashboard that referenced this pull request Mar 23, 2022
mtrezza pushed a commit to mtrezza/parse-dashboard that referenced this pull request Mar 23, 2022
* adding internal class (e.g. `_User`) fails due to prefixed underscore ([parse-community#2036](parse-community#2036)) ([f80bd07](parse-community@f80bd07))
mtrezza pushed a commit to mtrezza/parse-dashboard that referenced this pull request Mar 23, 2022
* adding internal class (e.g. `_User`) fails due to prefixed underscore ([parse-community#2036](parse-community#2036)) ([f80bd07](parse-community@f80bd07))
* security upgrade prismjs from 1.26.0 to 1.27.0 ([parse-community#2047](parse-community#2047)) ([3afb24e](parse-community@3afb24e))
mtrezza pushed a commit to mtrezza/parse-dashboard that referenced this pull request Mar 23, 2022
* adding internal class (e.g. `_User`) fails due to prefixed underscore ([parse-community#2036](parse-community#2036)) ([f80bd07](parse-community@f80bd07))
parseplatformorg pushed a commit that referenced this pull request Mar 23, 2022
# [4.1.0-alpha.1](4.0.1...4.1.0-alpha.1) (2022-03-23)

### Bug Fixes

* adding internal class (e.g. `_User`) fails due to prefixed underscore ([#2036](#2036)) ([e004e70](e004e70))
* security upgrade prismjs from 1.26.0 to 1.27.0 ([#2047](#2047)) ([ffbca12](ffbca12))
* upgrade @babel/runtime from 7.17.0 to 7.17.2 ([#2055](#2055)) ([3e8449b](3e8449b))
* upgrade express from 4.17.2 to 4.17.3 ([#2058](#2058)) ([d1357de](d1357de))
* upgrade otpauth from 7.0.10 to 7.0.11 ([#2061](#2061)) ([05c5ac8](05c5ac8))

### Features

* change string filter description ([#2059](#2059)) ([6470c8e](6470c8e))
parseplatformorg pushed a commit that referenced this pull request Mar 23, 2022
# [4.1.0-beta.1](4.0.1...4.1.0-beta.1) (2022-03-23)

### Bug Fixes

* adding internal class (e.g. `_User`) fails due to prefixed underscore ([#2036](#2036)) ([e004e70](e004e70))
* security upgrade prismjs from 1.26.0 to 1.27.0 ([#2047](#2047)) ([ffbca12](ffbca12))
* upgrade @babel/runtime from 7.17.0 to 7.17.2 ([#2055](#2055)) ([3e8449b](3e8449b))
* upgrade express from 4.17.2 to 4.17.3 ([#2058](#2058)) ([d1357de](d1357de))
* upgrade otpauth from 7.0.10 to 7.0.11 ([#2061](#2061)) ([05c5ac8](05c5ac8))

### Features

* change string filter description ([#2059](#2059)) ([6470c8e](6470c8e))
parseplatformorg pushed a commit that referenced this pull request Apr 3, 2022
# [4.1.0](4.0.1...4.1.0) (2022-04-03)

### Bug Fixes

* adding internal class (e.g. `_User`) fails due to prefixed underscore ([#2036](#2036)) ([e004e70](e004e70))
* security upgrade prismjs from 1.26.0 to 1.27.0 ([#2047](#2047)) ([ffbca12](ffbca12))
* upgrade @babel/runtime from 7.17.0 to 7.17.2 ([#2055](#2055)) ([3e8449b](3e8449b))
* upgrade express from 4.17.2 to 4.17.3 ([#2058](#2058)) ([d1357de](d1357de))
* upgrade otpauth from 7.0.10 to 7.0.11 ([#2061](#2061)) ([05c5ac8](05c5ac8))

### Features

* change string filter description ([#2059](#2059)) ([6470c8e](6470c8e))
dblythy pushed a commit to dblythy/parse-dashboard that referenced this pull request Apr 4, 2022
* adding internal class (e.g. `_User`) fails due to prefixed underscore ([parse-community#2036](parse-community#2036)) ([f80bd07](parse-community@f80bd07))
dblythy pushed a commit to dblythy/parse-dashboard that referenced this pull request Jan 19, 2023
* adding internal class (e.g. `_User`) fails due to prefixed underscore ([parse-community#2036](parse-community#2036)) ([f80bd07](parse-community@f80bd07))
dblythy pushed a commit to dblythy/parse-dashboard that referenced this pull request Jan 19, 2023
* adding internal class (e.g. `_User`) fails due to prefixed underscore ([parse-community#2036](parse-community#2036)) ([f80bd07](parse-community@f80bd07))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix error blocking creation of new special classes
3 participants