Damaged magic armor/weapons worthless?

Seems like magic items can’t be sold unless identified, and if they are <50% condition you have to spend more to repair them than they will sell for? So are the only damaged magic items worth picking up those that are the type you might want to equip if they have a good enough enchantment?