The others have been fairly easy on you. I'm not of that opinion. You made a VERY SERIOUS mistake that could have had deadly consequenses. This time you were lucky but you should not take this as something that "just happens". It doesn't "just happen" and was the result of a major lack of experience or lack of training.
I'm not saying that these things happen to others(or to myself), I'm saying that the idea of"it's OK, no one was hurt" is wrong thinking. If you plowed your car through a crowd because you forgot it was in gear, would it be OK because no one was hurt? I, personally, don't think so.
PS
This wasn't really an AD it was a negligent discharge. You pulled the trigger on a loaded pistol. There was no ACCIDENT in the pistol firing. You made an intentional action.