We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It is not safe to do this type of thing for "geo enabled" fields, because "enabled" means that latitude longitude might not be provided:
latitude
longitude
hooks: { afterValidate: function (rep_surface, options) { rep_surface.the_geom = sequelize.fn('ST_SetSRID', sequelize.fn('ST_MakePoint', rep_surface.longitude, rep_surface.latitude), '4326'); }, }
Need to either include an if statement for all "geo enabled" tables, or include only for tables where "geo enabled" but not "geo required":
if
hooks: { afterValidate: function (rep_surface, options) { if (rep_surface.longitude && rep_surface.latitude) { rep_surface.the_geom = sequelize.fn('ST_SetSRID', sequelize.fn('ST_MakePoint', rep_surface.longitude, rep_surface.latitude), '4326'); } }, }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It is not safe to do this type of thing for "geo enabled" fields, because "enabled" means that
latitude
longitude
might not be provided:Need to either include an
if
statement for all "geo enabled" tables, or include only for tables where "geo enabled" but not "geo required":The text was updated successfully, but these errors were encountered: