def update_parent_field(f, new):
 if (f[u'fieldtype'] == u'Table'):
  frappe.db.begin()
  frappe.db.sql((u'update `tab%s` set parentfield=%s where parentfield=%s' % (f[u'options'], u'%s', u'%s')), (new, f[u'fieldname']))
  frappe.db.commit()

def update_parent_field ( f , new ) : if ( f [ u'fieldtype' ] == u'Table' ) : frappe . db . begin ( ) frappe . db . sql ( ( u'update `tab%s` set parentfield=%s where parentfield=%s' % ( f [ u'options' ] , u'%s' , u'%s' ) ) , ( new , f [ u'fieldname' ] ) ) frappe . db . commit ( )
update parentfield in tables .