This might sound dumb but what happens to a normal rank 30 weapon or warframe after placing/upgrading it with a potato?

Would the mod capacity double or would it stay at 30?

The reason why I asked this is because I normally level a potato'ed weapon from the ground up - starting from being unranked to rank 30 to get all 60 mod points. I'm quite scared to place a potato on an already rank 30 piece of equipment because i'm not sure if the mod capacity would double or not.

It doesn't matter when you put it in. If you put it in to start, you get 2 points per level. If you put it in when it hits 30, you get an extra 30 making it total to 60.