What are you trying to accomplish here? load_current_resource should be setting attributes for an existing resource (in this case, an existing device).