Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix access to unbound slots

  • Loading branch information...
commit 3e56bf411c4222692b73250d7a6dcea864cb581d 1 parent 6aad78a
Yann Hodique authored
Showing with 12 additions and 6 deletions.
  1. +12 −6 gh-orgs.el
18 gh-orgs.el
View
@@ -126,12 +126,18 @@
(gh-read data 'plan)))))
(defmethod gh-orgs-org-to-obj ((org gh-orgs-org))
- `(("billing_email" . ,(oref org :billing-email))
- ("blog" . ,(oref org :blog))
- ("company" . ,(oref org :company))
- ("email" . ,(oref org :email))
- ("location" . ,(oref org :location))
- ("name" . ,(oref org :name))))
+ `(,@(when (slot-boundp org :billing-email)
+ (list (cons "billing_email" (oref org :billing-email))))
+ ,@(when (slot-boundp org :blog)
+ (list (cons "blog" (oref org :blog))))
+ ,@(when (slot-boundp org :company)
+ (list (cons "company" (oref org :company))))
+ ,@(when (slot-boundp org :email)
+ (list (cons "email" (oref org :email))))
+ ,@(when (slot-boundp org :location)
+ (list (cons "location" (oref org :location))))
+ ,@(when (slot-boundp org :name)
+ (list (cons "name" (oref org :name))))))
(defmethod gh-orgs-list ((api gh-orgs-api) &optional username)
(gh-api-authenticated-request
Please sign in to comment.
Something went wrong with that request. Please try again.