Changeset 1903 in main


Ignore:
Timestamp:
12/14/12 13:56:24 (6 years ago)
Author:
pcosquer
Message:

views: maangement: use obj.plmobjectuserlink_plmobject insteads of models.PLMObjectUserLink to be compatible with ECR

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openPLM/plmapp/views/main.py

    r1869 r1903  
    15951595    """ 
    15961596    obj, ctx = get_generic_data(request, obj_type, obj_ref, obj_revi) 
    1597     link = models.PLMObjectUserLink.current_objects.get(id=int(link_id)) 
    1598     if obj.object.id != link.plmobject.id: 
    1599         raise ValueError("Bad link id") 
     1597    link = obj.plmobjectuserlink_plmobject.now().get(id=int(link_id)) 
    16001598     
    16011599    if request.method == "POST": 
     
    17011699        try: 
    17021700            link_id = int(request.POST["link_id"]) 
    1703             link = models.PLMObjectUserLink.current_objects.get(id=link_id) 
     1701            link = obj.plmobjectuserlink_plmobject.now().get(id=link_id) 
    17041702            obj.remove_user(link) 
    17051703        except (KeyError, ValueError, ControllerError): 
Note: See TracChangeset for help on using the changeset viewer.