Browse Source

Merge "Remove unnecessary DB read"

changes/71/788871/1
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
7441694cd4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      cinder/volume/api.py

+ 1
- 1
cinder/volume/api.py View File

@ -2255,7 +2255,7 @@ class API(base.Base):
def attachment_delete(self, ctxt, attachment):
ctxt.authorize(attachment_policy.DELETE_POLICY,
target_obj=attachment)
volume = objects.Volume.get_by_id(ctxt, attachment.volume_id)
volume = attachment.volume
if attachment.attach_status == fields.VolumeAttachStatus.RESERVED:
self.db.volume_detached(ctxt.elevated(), attachment.volume_id,
attachment.get('id'))


Loading…
Cancel
Save