Scott Baker | af599eb | 2017-03-21 12:43:26 -0700 | [diff] [blame] | 1 | from synchronizers.new_base.modelaccessor import * |
| 2 | |
Scott Baker | b63ea79 | 2016-08-11 10:24:48 -0700 | [diff] [blame] | 3 | def handle(controller_user): |
Scott Baker | b63ea79 | 2016-08-11 10:24:48 -0700 | [diff] [blame] | 4 | try: |
| 5 | my_status_code = int(controller_user.backend_status[0]) |
| 6 | try: |
| 7 | his_status_code = int(controller_user.user.backend_status[0]) |
| 8 | except: |
| 9 | his_status_code = 0 |
| 10 | |
| 11 | if (my_status_code not in [0,his_status_code]): |
| 12 | controller_user.user.backend_status = controller_user.backend_status |
| 13 | controller_user.user.save(update_fields = ['backend_status']) |
| 14 | except Exception,e: |
| 15 | print str(e) |
| 16 | pass |