Skip to content

Commit

Permalink
Fix for loading geography fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaKrasavtsev committed Mar 25, 2020
1 parent 3062668 commit 507f456
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Loader.prototype.loadFixture = function(fixture, models) {
var where = {};
Object.keys(Model.rawAttributes).forEach(function(k) {
var fieldType = Model.rawAttributes[k].type.constructor.key;
if (data.hasOwnProperty(k) && (!fixture.keys || fixture.keys.indexOf(k) !== -1) && fieldType !== 'GEOMETRY' && fieldType !== 'VIRTUAL') {
if (data.hasOwnProperty(k) && (!fixture.keys || fixture.keys.indexOf(k) !== -1) && fieldType !== 'GEOMETRY' && fieldType !== 'GEOGRAPHY' && fieldType !== 'VIRTUAL') {
//postgres
if (fieldType === 'JSONB') {
where[k] = {};
Expand Down

0 comments on commit 507f456

Please sign in to comment.