isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

Fix/facebook pixel #776

Closed alexanderleegs closed 1 year ago

alexanderleegs commented 1 year ago

Problem

This PR fixes an issue where users with facebook-pixel values (pre-cms) could not edit their settings page. The issue was that the facebook-pixel value is always a 15 digit number, and sites which edited via github would have entered it as such - we would thus be reading and attempting to write facebook-pixel values as a number, while our request schema specified a string.

The fix for this is to parse the value as a string on read, in order to account for users who may have inserted the facebook-pixel value as a number (e.g. facebook-pixel: 12345).

This PR is to be reviewed in conjunction with PR #1282 on the isomercms-frontend repo.

kishore03109 commented 1 year ago

@alexanderleegs seems that tests are failing, please dismiss my review if it involves code change apart from just changing the relevant .spec fles