In the Code below am trying to read a record after save. Ideally the "record" should contain all the data that is been saved in previous step, but when i try to get record information i get none for all the fields except username.
@skygear.after_save('user', async=True)
def update_user(record, original_record, db):
if original_record is None:
print( record.get("updatedBy"))
print( record.get("ownerId"))
print( record.get("createdBy"))
r = requests.post("https://d3125f95.ngrok.io/insertuser", headers={ "Content-Type": "application/json" },
data=json.dumps({ "username": str(record.get("username")), "_id": str(record.get("_id") )}))
print(r.text)
return r
In the Code below am trying to read a record after save. Ideally the "record" should contain all the data that is been saved in previous step, but when i try to get record information i get none for all the fields except username.
@skygear.after_save('user', async=True) def update_user(record, original_record, db): if original_record is None: print( record.get("updatedBy")) print( record.get("ownerId")) print( record.get("createdBy")) r = requests.post("https://d3125f95.ngrok.io/insertuser", headers={ "Content-Type": "application/json" }, data=json.dumps({ "username": str(record.get("username")), "_id": str(record.get("_id") )})) print(r.text) return r
Expected Results
e1fdce23-cc21-4012-806c-3a31fa97cf2b e1fdce23-cc21-4012-806c-3a31fa97cf2b e1fdce23-cc21-4012-806c-3a31fa97cf2b efsdf
Actual Results
None None None efsdf
Steps to reproduce
Py-skygear